Skip to content

Commit

Permalink
feat: add health-check routes
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed Sep 23, 2023
1 parent 74f7ffb commit fe89623
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DB_DATABASE="gains"
DB_URL=

# node
PORT=8080
PORT=8087
VUE_PORT=3000
ENV="development"
COOKIE_SECRET="hell yeah"
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ RUN npm install
RUN apk update
RUN apk add
RUN apk add ffmpeg
RUN apk --no-cache add curl

COPY ./ .

EXPOSE 8080
EXPOSE 8087

HEALTHCHECK --interval=120s --timeout=60s CMD curl -s http://localhost:8080 || exit 1
HEALTHCHECK CMD curl -f http://localhost:8087/health-check || exit 1

CMD ["npm", "run", "dev:hmr"]
5 changes: 3 additions & 2 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ RUN npm install
RUN apk update
RUN apk add
RUN apk add ffmpeg
RUN apk add curl

COPY ./ .

RUN npm run build:ui

EXPOSE 8080
EXPOSE 8087

HEALTHCHECK --interval=240s --timeout=120s --retries=5 CMD curl -s http://localhost:8080 || exit 1
HEALTHCHECK --interval=240s --timeout=120s --retries=5 CMD curl -s http://localhost:8087 || exit 1

CMD ["npm", "run", "start"]
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

source .env

caprover deploy -h $CAPROVER_DOMAIN -p $CAPROVER_PASSWORD -b $CAPROVER_GIT_BRANCH_NAME -a $CAPROVER_APP_NAME
caprover deploy --caproverUrl $CAPROVER_DOMAIN --appToken $CAPROVER_APP_TOKEN --appName $CAPROVER_APP_NAME -b $CAPROVER_GIT_BRANCH_NAME
2 changes: 1 addition & 1 deletion src/services/emails/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ export default class Template {
// const data = {
// username: 'jaw',
// // username: 9,
// verificationLink: 'https://localhost:8080/',
// verificationLink: 'https://localhost:8087/',
// };
// Template.generate('verify-email', data);

0 comments on commit fe89623

Please sign in to comment.