Skip to content

Commit

Permalink
feat: Add an healthcheck to the gateway (close #104)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Dec 2, 2019
1 parent 75fdb36 commit 01a5f3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 5 additions & 3 deletions build/express-gateway/dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG TAG
FROM express-gateway:$TAG

# Install the dependencies (needed by exposeMetrics)
RUN yarn global add [email protected]
# Install the dependencies
RUN yarn global add [email protected] aws-sdk

# Override the consumers models
COPY ./models /var/lib/eg/models
Expand All @@ -17,6 +17,8 @@ COPY ./scripts/populate.js /var/lib/eg/populate.js
RUN mkdir -p /plugins
COPY ./plugins /plugins

WORKDIR /plugins





6 changes: 3 additions & 3 deletions configs/express-gateway/system.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ db:

plugins:
metrics:
package: ./metrics.js
package: ./plugins/metrics.js
scopes:
package: ./scopes.js
package: ./plugins/scopes.js
healthcheck:
package: ./healthcheck.js
package: ./plugins/healthcheck.js

5 changes: 5 additions & 0 deletions deploy/express-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ services:
target: /var/lib/eg/gateway.config.yml
- source: consumers_conf
target: /var/lib/eg/consumers.config.json
healthcheck:
test: ["CMD", "wget", "-q", "--tries=1", "--spider", "http://localhost:8080/healthcheck"]
interval: 30s
timeout: 10s
retries: 3
networks:
- kargo-network
deploy:
Expand Down

0 comments on commit 01a5f3f

Please sign in to comment.