Skip to content

Commit

Permalink
[#715] Add healthchecks to two main backend services from Traefik loa…
Browse files Browse the repository at this point in the history
…d balancer

The commit enhances the Traefik configuration within the
docker-compose.yml.tpl file by adding healthcheck configurations to the
two primary backend services, `metadata-validation` and `backend`. These
healthchecks include defining paths, ports, intervals, and timeouts for
monitoring the health and status of the backend services. By
implementing healthchecks, Traefik can periodically verify the
availability and responsiveness of the backend services through
specified endpoints, contributing to improved load balancing and routing
efficiency. This change directly addresses the user story requirement to
ensure the backend service is correctly defined, reachable, and
functioning optimally in the dev environment for effective testing and
debugging purposes.
  • Loading branch information
placek committed Apr 15, 2024
1 parent c47e0e9 commit 6a1968a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/govtool/config/templates/docker-compose.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ services:
- "traefik.http.routers.to-metadata-validation.entrypoints=websecure"
- "traefik.http.routers.to-metadata-validation.tls.certresolver=myresolver"
- "traefik.http.services.metadata-validation.loadbalancer.server.port=3000"
- "traefik.http.services.metadata-validation.loadbalancer.healthcheck.path=/health"
- "traefik.http.services.metadata-validation.loadbalancer.healthcheck.port=3000"
- "traefik.http.services.metadata-validation.loadbalancer.healthcheck.interval=10s"
- "traefik.http.services.metadata-validation.loadbalancer.healthcheck.timeout=5s"

backend:
image: <REPO_URL>/backend:${BACKEND_TAG}
Expand All @@ -232,6 +236,10 @@ services:
- "traefik.http.routers.to-backend.entrypoints=websecure"
- "traefik.http.routers.to-backend.tls.certresolver=myresolver"
- "traefik.http.services.backend.loadbalancer.server.port=9876"
- "traefik.http.services.backend.loadbalancer.healthcheck.path=/epoch/params"
- "traefik.http.services.backend.loadbalancer.healthcheck.port=9876"
- "traefik.http.services.backend.loadbalancer.healthcheck.interval=10s"
- "traefik.http.services.backend.loadbalancer.healthcheck.timeout=5s"

frontend:
image: <REPO_URL>/frontend:${FRONTEND_TAG}
Expand Down

0 comments on commit 6a1968a

Please sign in to comment.