Compose-Examples/examples/vaultwarden/docker-compose.yml

80 lines
2.9 KiB
YAML
Raw Normal View History

2023-02-15 21:45:31 +00:00
version: "3"
services:
vaultwarden:
image: vaultwarden/server:latest
2023-02-15 21:45:31 +00:00
container_name: vaultwarden
hostname: vaultwarden
restart: unless-stopped
2023-02-15 21:45:31 +00:00
dns:
- 1.1.1.1
environment:
#- ADMIN_TOKEN=MySecureAdminTokenPasswordForAdminArea
2023-03-07 01:03:55 +00:00
#- SIGNUPS_ALLOWED=false
2023-02-15 21:45:31 +00:00
#- globalSettings__mail__replyToEmail=bitwarden@example.com
#- globalSettings__mail__smtp__host=smtp.gmail.com
#- globalSettings__mail__smtp__username=bitwarden@example.com
#- globalSettings__mail__smtp__password=MyStrongSmtpLoginPassword
#- globalSettings__mail__smtp__ssl=true
#- globalSettings__mail__smtp__port=587
- LOG_FILE=/data/logs/access.log
- WEBSOCKET_ENABLED=true
- ROCKET_ENV=prod
- ROCKET_WORKERS=10
- TZ=Europe/Berlin
- LOG_LEVEL=error
- EXTENDED_LOGGING=true
ports:
- 8888:80
#networks:
# - proxy
2023-02-15 21:45:31 +00:00
#labels:
# - com.centurylinklabs.watchtower.monitor-only=true
# - traefik.enable=true
# - traefik.docker.network=proxy
# - traefik.http.routers.vaultwarden.rule=Host(`bitwarden.example.com`)
# - traefik.http.routers.vaultwarden.service=vaultwarden
# - traefik.http.services.vaultwarden.loadbalancer.server.port=80
# - traefik.http.routers.vaultwarden-ws.rule=Host(`bitwarden.example.com`) && Path(`/notifications/hub`)
# - traefik.http.routers.vaultwarden-ws.service=vaultwarden-ws
# - traefik.http.services.vaultwarden-ws.loadbalancer.server.port=3012
# - traefik.http.routers.vaultwarden-admin.rule=Host(`bitwarden.example.com`) && Path(`/admin`)
# - traefik.http.routers.vaultwarden-admin.service=vaultwarden
# - traefik.http.services.vaultwarden-admin.loadbalancer.server.port=80
# - traefik.http.routers.vaultwarden-admin.middlewares=local-ipwhitelist@file,authelia@file
2023-02-15 21:45:31 +00:00
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/vaultwarden/data:/data
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/vaultwarden/logs:/data/logs
2023-02-15 21:45:31 +00:00
2023-02-26 04:34:45 +00:00
# this service will backup your vaultwarden instance correctly
2023-02-15 21:45:31 +00:00
# see https://github.com/Bruceforce/vaultwarden-backup for more information
vaultwarden-backup:
image: bruceforce/vaultwarden-backup:latest
2023-02-15 21:45:31 +00:00
container_name: vaultwarden-backup
hostname: vaultwarden-backup
restart: always
2023-02-15 21:45:31 +00:00
init: true
depends_on:
- vaultwarden
#labels:
# com.centurylinklabs.watchtower.monitor-only: true
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/vaultwarden/data:/data/
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/vaultwarden/backup:/myBackup
2023-02-15 21:45:31 +00:00
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
#networks:
# - proxy
2023-02-15 21:45:31 +00:00
environment:
- TIMESTAMP=true
- DELETE_AFTER=30
- UID=0
- GID=1000
- TZ=Europe/Berlin
- BACKUP_DIR=/myBackup
- CRON_TIME=50 3 * * * # see https://crontab.guru/, define without quotes!
#networks:
# proxy:
# external: true