chore: simple docker compose add health check

pull/90/head
moonrailgun 2 years ago
parent da6960bdbf
commit bd5304cc5e

@ -8,15 +8,21 @@ services:
restart: unless-stopped
env_file: ../../docker-compose.env
environment:
SERVICEDIR: services
SERVICEDIR: services,plugins
PORT: 3000
depends_on:
- mongo
- redis
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/health`)"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
- "traefik.http.services.api-gw.loadbalancer.server.port=3000"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/health" ]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
networks:
- internal

Loading…
Cancel
Save