Greetings!
I’m new to docker so far, so don’t judge harshly
Such a question, I want to set up a connection with postgresql my vaultwarden image here is my compose file.
version: '3.8'
services:
vaultwarden_db:
container_name: Vaultwarden-DB
hostname: vaultwarden-DB
image: postgres:14
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/vw-postgresql.key
- POSTGRES_DB=vaultwarden_DB
- POSTGRES_USER=vaultwardenuser
healthcheck:
test: [“CMD”, “pg_isready”, “-q”, “-d”, “vaultwarden_DB”, “-U”, “vaultwardenuser”]
networks:
- dmz-proxy
secrets:
- vw-postgresql.key
volumes:
- volume_vault_vaultwarden:var/lib/postgresql/data:rw
bitwarden_vaultwarden:
container_name: bitwarden
hostname: vaultwarden
image: vaultwarden/server:latest
restart: always
environment:
- DATABASE_URL=postgresql://vaultwardenuser:/run/secrets/vw-postgresql.key@Vaultwarden-DB:5432/vaultwarden_DB
Am I right in specifying the path to the secret key-file, or is it still not possible to pass the secret file as a password to the database?