🚀 feat: Add healthcheck configuration for API service in docker-compose.yml #6148

This commit is contained in:
Ruben Talstra 2025-03-03 20:41:01 +01:00
parent 3accf91094
commit be060cbfb7
No known key found for this signature in database
GPG key ID: 2A5A7174A60F3BEA

View file

@ -1,5 +1,5 @@
# Do not edit this file directly. Use a docker-compose.override.yaml file if you can.
# Refer to `docker-compose.override.yaml.example for some sample configurations.
# Refer to `docker-compose.override.yaml.example` for some sample configurations.
services:
api:
@ -27,6 +27,13 @@ services:
- ./images:/app/client/public/images
- ./uploads:/app/uploads
- ./logs:/app/api/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://api:${PORT}/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
mongodb:
container_name: chat-mongodb
image: mongo