container-server/services/vaultwarden/docker-compose.yml
Carsten Sprung 7f5755b537 fix: Remove hostnames from docker-compose configs (#76)
- [x] This fixes services being not reachable from inside their own container
- [x] Container name must be different to URL hostname

Reviewed-on: #76
2024-09-30 17:27:30 +02:00

52 lines
1.4 KiB
YAML

version: '3.7'
# https://hub.docker.com/r/vaultwarden/server
# https://github.com/dani-garcia/vaultwarden/pkgs/container/vaultwarden
# https://github.com/dani-garcia/vaultwarden
networks:
vaultwarden:
services:
vaultwarden:
image: ghcr.io/dani-garcia/vaultwarden:1.32.0-alpine
container_name: vaultwarden
restart: "${RESTART:-no}"
domainname: ${BASE_DOMAIN}
environment:
- DOMAIN=https://passwords.${BASE_DOMAIN}
- TZ=${TIMEZONE}
- DATABASE_URL=postgres://vaultwarden:${VAULTWARDEN_PG_PWD:-vaultwarden}@pg-vaultwarden:5432/vaultwarden
- SMTP_HOST=mail
- SMTP_FROM=vaultwarden@${BASE_DOMAIN}
- SMTP_PORT=25
- SMTP_SECURITY=off
- ADMIN_TOKEN=${VAULTWARDEN_ADMIN_TOKEN}
- SIGNUPS_ALLOWED=false
- INVITATIONS_ALLOWED=false
- SHOW_PASSWORD_HINT=false
- LOG_FILE=/data/logs/vaultwarden.log
volumes:
- ${BASE_DIR:-/srv}/vaultwarden/data:/data
depends_on:
- pg-vaultwarden
networks:
- proxy
- mail
- vaultwarden
pg-vaultwarden:
image: postgres:16-alpine
container_name: pg-vaultwarden
restart: "${RESTART:-no}"
environment:
- POSTGRES_DB=vaultwarden
- POSTGRES_USER=vaultwarden
- POSTGRES_PASSWORD=${VAULTWARDEN_PG_PWD:-vaultwarden}
volumes:
- ${BASE_DIR:-/srv}/vaultwarden/psql:/var/lib/postgresql/data
networks:
- vaultwarden