Optimized central databases

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-05 22:00:59 +01:00
parent fdfe9dee78
commit deec416abf
2 changed files with 13 additions and 0 deletions

View File

@ -24,6 +24,12 @@
published_ports: published_ports:
- "127.0.0.1:3306:3306" # can be that this will be removed if all applications use sockets - "127.0.0.1:3306:3306" # can be that this will be removed if all applications use sockets
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
restart_policy: unless-stopped
healthcheck:
test: "/usr/bin/mariadb --user=root --password={{central_mariadb_root_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
when: run_once_docker_mariadb is not defined when: run_once_docker_mariadb is not defined
- name: install python-mysqlclient - name: install python-mysqlclient

View File

@ -18,6 +18,13 @@
- "127.0.0.1:5432:5432" - "127.0.0.1:5432:5432"
volumes: volumes:
- central_postgres_database:/var/lib/postgresql/data - central_postgres_database:/var/lib/postgresql/data
restart_policy: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
when: run_once_docker_postgres is not defined when: run_once_docker_postgres is not defined
- name: wait for availability of postgres - name: wait for availability of postgres