Skip to content

Commit

Permalink
bug: TEST fronend health probe failing (#23)
Browse files Browse the repository at this point in the history
* bug: single port health check

* Cleanup
  • Loading branch information
DerekRoberts authored Sep 22, 2023
1 parent 62c9d32 commit 773c5bc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '3.9'

x-common: &common
depends_on: ["backend"]
environment:
VITE_USER_POOLS_ID: ca-central-1_FxagSNQa7
VITE_USER_POOLS_WEB_CLIENT_ID: 43hjhdf5dvi17opb0jgucfpvm7
Expand All @@ -22,8 +23,7 @@ services:
CHES_TOKEN_URL : https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token
CHES_CLIENT_ID : 09C5071A-ACE9B6FACF6
CHES_CLIENT_SECRET : 9c82d5fc-1d34-4a0c-97f2-c0c756791c34
ports:
- "5000:5000"
ports: ["5000:5000"]
volumes: ["./backend:/app", "/app/node_modules"]
restart: always
build:
Expand Down
6 changes: 0 additions & 6 deletions frontend/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,3 @@

file_server
}

:3001 {
handle /health {
respond "OK"
}
}
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ RUN apk add --no-cache ca-certificates && \

# User, port and healthcheck
USER 1001
EXPOSE 3000 3001
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost/:3001/health
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost/:3000
8 changes: 4 additions & 4 deletions frontend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ objects:
memory: "${MEMORY_LIMIT}"
readinessProbe:
httpGet:
path: /health
port: 3001
path: /
port: 3000
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 2
Expand All @@ -144,8 +144,8 @@ objects:
successThreshold: 1
failureThreshold: 3
httpGet:
path: /health
port: 3001
path: /
port: 3000
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 30
Expand Down

0 comments on commit 773c5bc

Please sign in to comment.