2021-05-01 23:00:37 +01:00
|
|
|
version: "2.3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
vaultwarden:
|
2023-04-06 21:15:05 +01:00
|
|
|
image: vaultwarden/server:1.28.1-alpine
|
2021-05-01 23:00:37 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
user: "{{ docker_user.id }}:{{ docker_user.id }}"
|
|
|
|
volumes:
|
|
|
|
- "{{ app_data_dir }}/vaultwarden/:/data"
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
|
2021-12-22 15:41:14 +00:00
|
|
|
- traefik.http.routers.vaultwarden-ui.rule=Host(`vaultwarden.jakehoward.tech`)
|
2021-05-01 23:00:37 +01:00
|
|
|
- traefik.http.routers.vaultwarden-ui.service=vaultwarden-ui
|
|
|
|
- traefik.http.services.vaultwarden-ui.loadbalancer.server.port=80
|
|
|
|
|
2021-12-22 15:41:14 +00:00
|
|
|
- traefik.http.routers.vaultwarden-websocket.rule=Host(`vaultwarden.jakehoward.tech`) && Path(`/notifications/hub`)
|
2021-05-01 23:00:37 +01:00
|
|
|
- traefik.http.routers.vaultwarden-websocket.service=vaultwarden-websocket
|
|
|
|
- traefik.http.services.vaultwarden-websocket.loadbalancer.server.port=3012
|
|
|
|
|
|
|
|
- traefik.http.middlewares.vaultwarden-ratelimit.ratelimit.average=5
|
|
|
|
- traefik.http.middlewares.vaultwarden-ratelimit.ratelimit.burst=1000
|
|
|
|
- traefik.http.middlewares.vaultwarden-compress.compress=true
|
|
|
|
|
|
|
|
- traefik.http.routers.vaultwarden-ui.middlewares=vaultwarden-ratelimit,vaultwarden-compress
|
|
|
|
- traefik.http.routers.vaultwarden-websocket.middlewares=vaultwarden-ratelimit,vaultwarden-compress
|
|
|
|
environment:
|
|
|
|
- SIGNUPS_ALLOWED=false
|
2021-05-18 22:18:05 +01:00
|
|
|
- DOMAIN=https://vaultwarden.jakehoward.tech
|
2021-05-01 23:00:37 +01:00
|
|
|
- SHOW_PASSWORD_HINT=false
|
2021-05-18 22:18:05 +01:00
|
|
|
- DATABASE_URL=postgres://vaultwarden:{{ vaultwarden_database_password }}@db/vaultwarden
|
2021-05-01 23:00:37 +01:00
|
|
|
- INVITATIONS_ALLOWED=false
|
2021-05-18 22:18:05 +01:00
|
|
|
- ROCKET_WORKERS={{ ansible_processor_nproc // 2 }}
|
2021-05-01 23:00:37 +01:00
|
|
|
- WEBSOCKET_ENABLED=true
|
2022-01-15 23:44:06 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- traefik
|
2021-05-01 23:00:37 +01:00
|
|
|
|
|
|
|
db:
|
2021-12-22 15:33:40 +00:00
|
|
|
image: postgres:14-alpine
|
2021-05-01 23:00:37 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
2023-06-15 21:18:50 +01:00
|
|
|
- /mnt/speed/dbs/postgres/vaultwarden/:/var/lib/postgresql/data
|
2021-05-01 23:00:37 +01:00
|
|
|
environment:
|
2021-05-18 22:18:05 +01:00
|
|
|
- POSTGRES_PASSWORD={{ vaultwarden_database_password }}
|
|
|
|
- POSTGRES_USER=vaultwarden
|
2022-01-15 23:44:06 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|