Create compose.yml
This commit is contained in:
parent
f8341074dd
commit
15e7ecd6f1
1 changed files with 77 additions and 0 deletions
77
compose.yml
Normal file
77
compose.yml
Normal file
|
@ -0,0 +1,77 @@
|
|||
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
|
||||
|
||||
networks:
|
||||
- VaultwardenNet
|
||||
|
||||
vaultwarden:
|
||||
image: vaultwarden/server:latest
|
||||
container_name: vaultwarden
|
||||
restart: always
|
||||
environment:
|
||||
DOMAIN: ${DOMAIN}
|
||||
DATABASE_URL: mysql://vaultwardenuser:${MARIADB_PASSWORD}@mariadb:3306/vaultwarden
|
||||
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
|
||||
networks:
|
||||
- VaultwardenNet
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
|
||||
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"
|
||||
networks:
|
||||
- VaultwardenNet
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
|
||||
|
||||
volumes:
|
||||
vaultwarden_vol:
|
||||
mariadb_vol:
|
||||
mariadb_socket:
|
||||
|
||||
networks:
|
||||
VaultwardenNet:
|
||||
driver: bridge
|
Loading…
Reference in a new issue