Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.29 KB

README.md

File metadata and controls

26 lines (16 loc) · 1.29 KB

Healthcheck for boca-docker

This demo shows how to make the boca-web and boca-jail services wait for the database container (boca-db) to startup and be ready to accept requests before continuing. The healthcheck has been configured to periodically check if PostgreSQL is ready using the pg_isready command. If the check is successful the container will be marked as healthy. Until then it will remain in an unhealthy state. For more details about the parameters interval, timeout, retries, and start_period see the documentation here.

NOTE: depends_on with healthcheck does not work when used with docker stack deploy. For more information, see the discussion thread here.

Example

  • Launch the application:

... via docker compose

docker compose -f tests/healthcheck/docker-compose.yml up -d
  • Open a web browser and visit the URL http://localhost:8000/boca. To login use the default credentials (Name: system | Password: boca).

  • To bring it down:

... via docker-compose

docker compose -f tests/healthcheck/docker-compose.yml down