From 38050a40a53ca2363823ef1cff08f85f1daea32b Mon Sep 17 00:00:00 2001 From: chausman <chausman@nrao.edu> Date: Tue, 27 Jun 2023 12:11:58 -0600 Subject: [PATCH] try moving health check to compose --- docker-compose.yml | 6 ++++++ services/capability/Dockerfile | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9ea3db0f7..6e460ac13 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,12 @@ services: published: 3457 protocol: tcp mode: host + healthcheck: + test: ( curl -f -LI "${ENV_HOST}":3458/healthcheck ) && ( curl -f -LI "${ENV_HOST}":3456/healthcheck ) || exit 1 + interval: 5s + retries: 5 + timeout: 60s + start_period: 30s environment: CAPO_PATH: /home/casa/capo CAPO_PROFILE: dsoc-${ENV} diff --git a/services/capability/Dockerfile b/services/capability/Dockerfile index c61f5a204..22ee898db 100644 --- a/services/capability/Dockerfile +++ b/services/capability/Dockerfile @@ -58,7 +58,9 @@ RUN poetry install FROM base as prod # Don't start until notification and workflow are ready -CMD sh ./bin/start-capability-with-healthchecks.sh +#CMD sh ./bin/start-capability-with-healthchecks.sh +CMD ["poetry", "run", "pserve", "--reload", "dev.ini"] + FROM base as dev -- GitLab