Skip to content

Commit

Permalink
health checks do not see traefik, need internal URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
infotroph committed Sep 11, 2024
1 parent 79e32f4 commit 6fa6fa2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ services:
- "traefik.http.services.bety.loadbalancer.server.port=8000"
- "traefik.http.routers.bety.rule=Host(`${TRAEFIK_HOST:-pecan.localhost}`) && PathPrefix(`/bety/`)"
healthcheck:
test: "curl --silent --fail http://localhost:8000/${RAILS_RELATIVE_URL_ROOT} > /dev/null || exit 1"
test: "curl --silent --fail http://localhost:8000/$${RAILS_RELATIVE_URL_ROOT} > /dev/null || exit 1"
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -190,7 +190,7 @@ services:
- pecan:/data
- pecan:/var/www/html/pecan/data
healthcheck:
test: "curl --silent --fail http://localhost/pecan/ > /dev/null || exit 1"
test: "curl --silent --fail http://localhost:8080/pecan > /dev/null || exit 1"
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -218,7 +218,7 @@ services:
volumes:
- pecan:/data
healthcheck:
test: "curl --silent --fail http://localhost:9999/monitor/ > /dev/null || exit 1"
test: "curl --silent --fail http://localhost:9999 > /dev/null || exit 1"
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -354,7 +354,7 @@ services:
- "traefik.http.routers.dbsync.middlewares=dbsync-stripprefix"
- "traefik.http.middlewares.dbsync-stripprefix.stripprefix.prefixes=/monitor"
healthcheck:
test: "curl --silent --fail http://localhost/dbsync/ > /dev/null || exit 1"
test: "curl --silent --fail http://localhost:3838 > /dev/null || exit 1"
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -386,7 +386,7 @@ services:
volumes:
- pecan:/data/
healthcheck:
test: "curl --silent --fail http://localhost/api/ping > /dev/null || exit 1"
test: "curl --silent --fail http://localhost:8000/api/ping > /dev/null || exit 1"
interval: 10s
timeout: 5s
retries: 5
Expand Down
5 changes: 5 additions & 0 deletions docker/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ RUN make build
# ----------------------------------------------------------------------
FROM httpd

# need curl for health checks
RUN apt-get update \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*

COPY docker/docs/index.html /usr/local/apache2/htdocs/
COPY --from=pecandocs /src/book_source/_book/ /usr/local/apache2/htdocs/docs/pecan/

Expand Down
2 changes: 1 addition & 1 deletion shiny/dbsync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV PGHOST=postgres \
GEOCACHE=/srv/shiny-server/geoip.json

RUN apt-get update \
&& apt-get -y install libpq-dev libssl-dev \
&& apt-get -y install curl libpq-dev libssl-dev \
&& install2.r -e -s -n -1 curl dbplyr DT leaflet RPostgreSQL \
&& rm -rf /srv/shiny-server/* \
&& rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit 6fa6fa2

Please sign in to comment.