Skip to content

Commit

Permalink
add healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
maede97 committed Nov 5, 2023
1 parent c7886ca commit 9a71fab
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ services:
- awt-tile-cache
env_file:
- .env.local-dev
healthcheck:
test: "curl -f http://localhost:8080"
interval: 2s
timeout: 1s
retries: 60

awt-swiss-tml-api:
build:
Expand All @@ -41,6 +46,11 @@ services:
- ./swiss_TLM_api:/app
env_file:
- .env.local-dev
healthcheck:
test: "curl -f http://localhost:1848/ready | grep 'ready'"
interval: 5s
timeout: 1s
retries: 180

awt-backend:
build:
Expand All @@ -53,8 +63,10 @@ services:
- ./backend:/app

depends_on:
- awt-mapfish-print-server
- awt-swiss-tml-api
awt-mapfish-print-server:
condition: service_healthy
awt-swiss-tml-api:
condition: service_healthy

environment:
TZ: Europe/Zurich
Expand All @@ -68,21 +80,22 @@ services:
# Used in the first stage of the Dockerfile, thus these env vars must be passed as args
args:
- ENVIRONMENT_FILE=.env.local-dev

volumes:
- ./frontend/src:/app/src
# Mount git info to container
- ./.git/HEAD:/app/.git/HEAD
- ./.git/refs/heads/:/app/.git/refs/heads/

ports:
- "80:80"

depends_on:
- awt-backend

env_file:
- .env.local-dev
healthcheck:
test: "curl -f http://localhost:80"
interval: 5s
timeout: 1s
retries: 180

volumes:
vitepress_dist: {}
Expand Down

0 comments on commit 9a71fab

Please sign in to comment.