Add docker-compose healthcheck and /api/healthcheck (#12)

This commit is contained in:
AJ Collins
2024-11-30 14:57:15 -08:00
committed by GitHub
parent a13b48af5b
commit ab8c22b3e5
2 changed files with 13 additions and 3 deletions
+8 -3
View File
@@ -1,9 +1,14 @@
version: '3.8'
---
services:
deflock:
image: public.ecr.aws/w2o0b9g0/deflock.me:latest
ports:
- 8080:8080
#restart: always
restart: always
healthcheck:
test: curl --fail http://localhost:8080/api/healthcheck || exit 1
interval: 30s # Time between health checks
timeout: 10s # Time to wait for a response
retries: 3 # Number of retries before marking as unhealthy
start_period: 10s # Time to wait before starting health checks
stdin_open: true