vaultwardenub/vaultwarden/compose.yml

72 lines
1.9 KiB
YAML
Raw Normal View History

2024-06-29 02:30:19 +02:00
services:
mariadb:
image: "mariadb"
container_name: "mariadb"
hostname: "mariadb"
restart: always
volumes:
- "mariadb_vol:/var/lib/mysql"
- "mariadb_socket:/run/mysqld"
- "/etc/localtime:/etc/localtime:ro"
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_DATABASE: "vaultwarden"
MARIADB_USER: "vaultwardenuser"
MYSQL_UNIX_PORT: "/run/mysqld/mysqld.sock"
MYSQL_ROOT_HOST: "%"
healthcheck:
test: ["CMD", "/bin/sh", "-c", "mariadb-admin ping -h localhost -u root -p$$MARIADB_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
2024-06-29 03:25:09 +02:00
ports:
- 3306:3306
network_mode: bridge
2024-06-29 02:30:19 +02:00
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
DOMAIN: ${DOMAIN}
2024-06-29 03:25:09 +02:00
DATABASE_URL: mysql://vaultwardenuser:${MARIADB_PASSWORD}@localhost:3306/vaultwarden
2024-06-29 02:30:19 +02:00
ADMIN_TOKEN: ${VAULTWARDEN_ADMIN_TOKEN}
SIGNUPS_DOMAINS_WHITELIST: uni-bremen.de
SIGNUPS_ALLOWED: false
volumes:
- "vaultwarden_vol:/data"
- "mariadb_socket:/run/mysqld"
ports:
- 11001:80
depends_on:
mariadb:
condition: service_healthy
2024-06-29 03:25:09 +02:00
network_mode: bridge
2024-06-29 02:30:19 +02:00
nginx:
image: nginx:stable-alpine
container_name: nginx
restart: always
volumes:
- "/root/nginx/key.pem:/certs/nginx_key.pem:ro"
- "/root/nginx/ca.pem:/certs/nginx_certificate.pem:ro"
- "/root/nginx/nginx.conf:/etc/nginx/nginx.conf:ro"
ports:
- "0.0.0.0:443:443"
- "0.0.0.0:80:80"
environment:
NGINX_WORKER_PROCESSES: "4"
NGINX_WORKER_CONNECTIONS: "768"
depends_on:
mariadb:
condition: service_healthy
2024-06-29 03:25:09 +02:00
network_mode: bridge
2024-06-29 02:30:19 +02:00
volumes:
vaultwarden_vol:
mariadb_vol:
mariadb_socket: