mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +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:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mariadb
|
image: mariadb:11
|
||||||
container_name: mariadb
|
container_name: mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- ./db:/var/lib/mysql
|
- ./db:/var/lib/mysql
|
||||||
|
@ -14,6 +14,12 @@ services:
|
||||||
- MARIADB_PASSWORD=gancio
|
- MARIADB_PASSWORD=gancio
|
||||||
- MARIADB_RANDOM_ROOT_PASSWORD=yes
|
- MARIADB_RANDOM_ROOT_PASSWORD=yes
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "healthcheck.sh", "--connect", "--mariadbupgrade"]
|
||||||
|
interval: 2s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
gancio:
|
gancio:
|
||||||
restart: always
|
restart: always
|
||||||
image: cisti/gancio
|
image: cisti/gancio
|
||||||
|
@ -33,4 +39,6 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:13120:13120"
|
- "127.0.0.1:13120:13120"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,11 @@ services:
|
||||||
- POSTGRES_DB=gancio
|
- POSTGRES_DB=gancio
|
||||||
- POSTGRES_PASSWORD=gancio
|
- POSTGRES_PASSWORD=gancio
|
||||||
- PGDATA=/var/lib/postgresql/data
|
- PGDATA=/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready"]
|
||||||
|
interval: 2s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
@ -34,4 +39,6 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:13120:13120"
|
- "127.0.0.1:13120:13120"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue