mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-02-23 12:51:54 +01:00
22 lines
704 B
Django/Jinja
22 lines
704 B
Django/Jinja
# This template needs to be included in docker-compose.yml, which depend on a mariadb database
|
|
{% if not enable_central_database | bool %}
|
|
database:
|
|
container_name: {{application_id}}-database
|
|
logging:
|
|
driver: journald
|
|
image: mariadb
|
|
restart: {{docker_restart_policy}}
|
|
env_file:
|
|
- {{database_env}}
|
|
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
|
|
volumes:
|
|
- database:/var/lib/mysql
|
|
healthcheck:
|
|
test: [ "CMD", "sh", "-c", "/usr/bin/mariadb --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD --execute 'SHOW DATABASES;'" ]
|
|
interval: 3s
|
|
timeout: 1s
|
|
retries: 5
|
|
networks:
|
|
- default
|
|
{% endif %}
|
|
{{ "\n" }} |