mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 08:32:23 +01:00
fix: docker compose mariadb/postgres healtcheck, fix #397
This commit is contained in:
parent
e4a648be1d
commit
30c932a7f2
2 changed files with 18 additions and 3 deletions
|
@ -2,7 +2,7 @@ version: '3'
|
|||
|
||||
services:
|
||||
db:
|
||||
image: mariadb
|
||||
image: mariadb:11
|
||||
container_name: mariadb
|
||||
volumes:
|
||||
- ./db:/var/lib/mysql
|
||||
|
@ -14,6 +14,12 @@ services:
|
|||
- MARIADB_PASSWORD=gancio
|
||||
- MARIADB_RANDOM_ROOT_PASSWORD=yes
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--mariadbupgrade"]
|
||||
interval: 2s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
gancio:
|
||||
restart: always
|
||||
image: cisti/gancio
|
||||
|
@ -33,4 +39,6 @@ services:
|
|||
ports:
|
||||
- "127.0.0.1:13120:13120"
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@ services:
|
|||
- POSTGRES_DB=gancio
|
||||
- POSTGRES_PASSWORD=gancio
|
||||
- PGDATA=/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready"]
|
||||
interval: 2s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
restart: always
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
@ -34,4 +39,6 @@ services:
|
|||
ports:
|
||||
- "127.0.0.1:13120:13120"
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
|
|
Loading…
Reference in a new issue