fix: Replace service_healthy conditions with service_started to prevent frequent writes
This commit is contained in:
@@ -10,6 +10,7 @@ services:
|
|||||||
backend:
|
backend:
|
||||||
image: gitea.lugnas.de/denis/legalconsenthub-backend:latest
|
image: gitea.lugnas.de/denis/legalconsenthub-backend:latest
|
||||||
container_name: legalconsenthub-backend
|
container_name: legalconsenthub-backend
|
||||||
|
restart: on-failure:2
|
||||||
environment:
|
environment:
|
||||||
LEGALCONSENTHUB_DB_URL: jdbc:postgresql://legalconsenthub-db:5432/${LEGALCONSENTHUB_POSTGRES_DB}
|
LEGALCONSENTHUB_DB_URL: jdbc:postgresql://legalconsenthub-db:5432/${LEGALCONSENTHUB_POSTGRES_DB}
|
||||||
LEGALCONSENTHUB_DB_APP_USER: ${LEGALCONSENTHUB_POSTGRES_USER}
|
LEGALCONSENTHUB_DB_APP_USER: ${LEGALCONSENTHUB_POSTGRES_USER}
|
||||||
@@ -21,17 +22,11 @@ services:
|
|||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
legalconsenthub-db:
|
legalconsenthub-db:
|
||||||
condition: service_healthy
|
condition: service_started
|
||||||
keycloak:
|
keycloak:
|
||||||
condition: service_healthy
|
condition: service_started
|
||||||
networks:
|
networks:
|
||||||
- legalconsenthub-net
|
- legalconsenthub-net
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
start_period: 60s
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env.prod
|
- .env.prod
|
||||||
|
|
||||||
@@ -42,7 +37,7 @@ services:
|
|||||||
- "3210:3000"
|
- "3210:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
keycloak:
|
keycloak:
|
||||||
condition: service_healthy
|
condition: service_started
|
||||||
networks:
|
networks:
|
||||||
- legalconsenthub-net
|
- legalconsenthub-net
|
||||||
env_file:
|
env_file:
|
||||||
@@ -70,17 +65,11 @@ services:
|
|||||||
- "7080:8080"
|
- "7080:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
keycloak-db:
|
keycloak-db:
|
||||||
condition: service_healthy
|
condition: service_started
|
||||||
networks:
|
networks:
|
||||||
- legalconsenthub-net
|
- legalconsenthub-net
|
||||||
env_file:
|
env_file:
|
||||||
- .env.prod
|
- .env.prod
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "curl --head -fsS http://localhost:9000/health/ready | echo $?"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 5
|
|
||||||
start_period: 40s
|
|
||||||
|
|
||||||
keycloak-db:
|
keycloak-db:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
@@ -97,12 +86,6 @@ services:
|
|||||||
- keycloak_postgres_data:/var/lib/postgresql
|
- keycloak_postgres_data:/var/lib/postgresql
|
||||||
env_file:
|
env_file:
|
||||||
- .env.prod
|
- .env.prod
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U $${KEYCLOAK_POSTGRES_USER} -d $${KEYCLOAK_POSTGRES_DB}"]
|
|
||||||
interval: 10s
|
|
||||||
retries: 5
|
|
||||||
start_period: 30s
|
|
||||||
timeout: 10s
|
|
||||||
|
|
||||||
legalconsenthub-db:
|
legalconsenthub-db:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
@@ -119,18 +102,12 @@ services:
|
|||||||
- legalconsenthub_postgres_data:/var/lib/postgresql
|
- legalconsenthub_postgres_data:/var/lib/postgresql
|
||||||
env_file:
|
env_file:
|
||||||
- .env.prod
|
- .env.prod
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U $${LEGALCONSENTHUB_POSTGRES_USER} -d $${LEGALCONSENTHUB_POSTGRES_DB}"]
|
|
||||||
interval: 10s
|
|
||||||
retries: 5
|
|
||||||
start_period: 30s
|
|
||||||
timeout: 10s
|
|
||||||
|
|
||||||
maildev:
|
maildev:
|
||||||
image: maildev/maildev:2.2.1
|
image: maildev/maildev:2.2.1
|
||||||
container_name: legalconsenthub-maildev
|
container_name: legalconsenthub-maildev
|
||||||
ports:
|
ports:
|
||||||
- "1080:1080"
|
- "1080:1080"
|
||||||
- "1025:1025"
|
- "1026:1025"
|
||||||
networks:
|
networks:
|
||||||
- legalconsenthub-net
|
- legalconsenthub-net
|
||||||
|
|||||||
Reference in New Issue
Block a user