chore: modify healthcheck

remove from dockerfile because some service not provide http service
pull/90/head
moonrailgun 2 years ago
parent 98cf631165
commit 86d945eb1a

@ -40,8 +40,5 @@ RUN pnpm build
# web static service port
EXPOSE 3000
# health check
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD wget localhost:3000/health -q -O - > /dev/null 2>&1
# Start server, ENV var is necessary
CMD ["pnpm", "start:service"]

@ -17,6 +17,12 @@ services:
- "traefik.enable=true"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
- "traefik.http.services.api-gw.loadbalancer.server.port=3000"
healthcheck:
test: [ "CMD", "wget", "localhost:3000/health", "-q", "-O", "-" ]
interval: 30s
timeout: 5s
retries: 5
start_period: 15s
networks:
- internal

Loading…
Cancel
Save