mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Renamed Database roles
This commit is contained in:
22
roles/cmp-rdbms/templates/services/mariadb.yml.j2
Normal file
22
roles/cmp-rdbms/templates/services/mariadb.yml.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
# This template needs to be included in docker-compose.yml, which depend on a mariadb database
|
||||
{% if not applications | is_feature_enabled('central_database',application_id) %}
|
||||
{{ database_host }}:
|
||||
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" }}
|
Reference in New Issue
Block a user