Skip to content

Commit

Permalink
Merge pull request #598 from nttcom/fix/e2e-connection-fail
Browse files Browse the repository at this point in the history
add healthcheck otpion
  • Loading branch information
mshim03 authored Feb 19, 2025
2 parents 3e80e6b + 6acb5b6 commit e7c7c58
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions docker-compose-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ services:
volumes:
- ./api/app:/app:ro
- ./key:/key:ro
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import requests, sys; sys.exit(0 if requests.get('http://localhost/api/').status_code == 404 else 1)",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
testdb:
image: postgres:14
command:
Expand All @@ -66,8 +78,10 @@ services:
traefik:
image: traefik:latest
depends_on:
- api
- web
api:
condition: service_healthy
web:
condition: service_started
ports:
- 80:80
- 8080:8080
Expand Down

0 comments on commit e7c7c58

Please sign in to comment.