computer-playbook/roles/docker-mybb/templates/docker-compose.yml.j2

46 lines
1.0 KiB
Django/Jinja

services:
application:
logging:
driver: journald
image: mybb/mybb:latest
restart: always
links:
- database
volumes:
- data:/var/www/html
server:
logging:
driver: journald
links:
- application
image: nginx:mainline
restart: always
ports:
- "127.0.0.1:{{http_port}}:80"
volumes:
- "{{conf_d_server_directory}}:{{conf_d_docker_directory}}:ro"
- "data:/var/www/html:ro"
database:
logging:
driver: journald
image: mariadb
environment:
MYSQL_DATABASE: "mybb"
MYSQL_USER: "mybb"
MYSQL_PASSWORD: "{{mybb_database_password}}"
MARIADB_ROOT_PASSWORD: "{{mybb_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=mybb --password={{mybb_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
restart: always
volumes:
database:
data:
networks:
default:
driver: bridge