add check healthy to container tryton

This commit is contained in:
sinergia 2023-06-14 21:52:22 -05:00
parent 22d829554f
commit ee77bb24bd
1 changed files with 10 additions and 5 deletions

View File

@ -35,9 +35,14 @@ services:
SMTP_FROM: ${SMTP_FROM}
SMTP_EMAIL: ${SMTP_EMAIL}
image: tryton/${POSTGRES_DB}:${TRYTOND_VERSION}
healthcheck:
test: curl --fail localhost:${TRYTON_PORT} || exit 1
interval: 30s
retries: 5
start_period: 30s
timeout: 20s
ports:
- "${TRYTON_PORT:-8000}:8000"
- "8010:8010"
volumes:
- modules:${DIR_MODULES}
- var:/var
@ -61,16 +66,16 @@ services:
tryton_worker:
image: tryton/${POSTGRES_DB}:${TRYTOND_VERSION}
depends_on:
- db
- tryton
tryton:
condition: service_healthy
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-worker -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf"]
env_file:
- .env
tryton_cron:
image: tryton/${POSTGRES_DB}:${TRYTOND_VERSION}
depends_on:
- db
- tryton
tryton:
condition: service_healthy
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf"]
env_file:
- .env