version: "3" services: database: image: postgres:13.4-alpine environment: - POSTGRES_USER={{ vaultwarden_dbuser }} - POSTGRES_PASSWORD={{ vaultwarden_dbpass }} - POSTGRES_DB={{ vaultwarden_dbname }} volumes: - ./database:/var/lib/postgresql/data restart: unless-stopped app: image: vaultwarden/server:latest environment: - DATABASE_URL=postgres://{{ vaultwarden_dbuser }}:{{ vaultwarden_dbpass }}@database/{{ vaultwarden_dbname }} - SIGNUPS_VERIFY=true - SIGNUPS_DOMAINS_WHITELIST=binary-kitchen.de - ADMIN_TOKEN={{ vaultwarden_token }} - ORG_ATTACHMENT_LIMIT=1024 - USER_ATTACHMENT_LIMIT=1024 - DOMAIN=http://{{ vaultwarden_domain }} - ROCKET_PORT=4000 - SMTP_HOST=mail.binary-kitchen.de - SMTP_FROM=vaultwarden@binary-kitchen.de - SMTP_FROM_NAME=Vaultwarden - SMTP_PORT=25 - HELO_NAME={{ ansible_fqdn }} volumes: - ./data:/data ports: - "127.0.0.1:4000:4000" restart: unless-stopped depends_on: - database