Added healthcheck
This commit is contained in:
@ -7,9 +7,24 @@ services:
|
||||
build: .
|
||||
env_file:
|
||||
- api/.env
|
||||
ports:
|
||||
- 80:80
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
db:
|
||||
container_name: db
|
||||
hostname: db
|
||||
image: mysql:latest
|
||||
env_file:
|
||||
- db/.env
|
||||
ports:
|
||||
- 3306:3306
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
Reference in New Issue
Block a user