Skip to content

Commit

Permalink
Add a health check for the db service
Browse files Browse the repository at this point in the history
[refs #87b1edef5b20]
  • Loading branch information
jfahrer committed May 5, 2018
1 parent 4692ca6 commit 9550214
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions swarm/swarm-demo-frontend/docker-compose.yml
Expand Up @@ -17,6 +17,11 @@ services:
- pg-data:/var/lib/postgresql/data
env_file:
- config/db.env
healthcheck:
test: echo "SELECT * FROM requests LIMIT 1" | psql -h localhost -U $$POSTGRES_USER || exit 1
interval: 10s
retries: 2
start_period: 2m

lb:
image: jfahrer/swarm-demo-lb:v1
Expand Down

0 comments on commit 9550214

Please sign in to comment.