feature: add plc-mirror healthcheck

main
Max Ignatenko 2024-09-07 13:48:19 +01:00
parent a41f6aa75c
commit db74fac7d0
2 changed files with 14 additions and 1 deletions

View File

@ -6,7 +6,7 @@ COPY . ./
RUN go build -trimpath ./cmd/plc-mirror
FROM alpine:latest as certs
RUN apk --update add ca-certificates
RUN apk --update add ca-certificates curl
FROM debian:stable-slim
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

View File

@ -79,6 +79,13 @@ services:
ports:
- "${METRICS_ADDR:-0.0.0.0}:11004:8080"
command: [ "--log-level=0" ]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ready"]
interval: 30s
timeout: 5s
retries: 30
start_period: 6h
start_interval: 15s
lister:
build:
@ -98,6 +105,8 @@ services:
depends_on:
postgres:
condition: service_healthy
plc:
condition: service_healthy
update-db-schema:
condition: service_completed_successfully
environment:
@ -125,6 +134,8 @@ services:
depends_on:
postgres:
condition: service_healthy
plc:
condition: service_healthy
update-db-schema:
condition: service_completed_successfully
environment:
@ -154,6 +165,8 @@ services:
depends_on:
postgres:
condition: service_healthy
plc:
condition: service_healthy
update-db-schema:
condition: service_completed_successfully
dns: