Skip to content

Commit

Permalink
chore: add HEALTHCHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Jun 10, 2024
1 parent 6b813ae commit d4c6e77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ jobs:
- run: npm run generate
- run: npm run lint
- run: npm run typecheck
- run: |
cp client/.env.example client/.env
cp server/.env.example server/.env
docker compose up -d
- run: cp client/.env.example client/.env
- run: cp server/.env.example server/.env
- run: docker compose up -d
- run: npm test
- run: npm run build
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ COPY server/package.json server/package-lock.json ./server/
RUN npm ci --prefix server

COPY . .
ARG NEXT_PUBLIC_FIREBASE_CONFIG
ARG API_BASE_PATH
ARG NEXT_PUBLIC_FIREBASE_CONFIG
ARG DATABASE_URL
ENV API_BASE_PATH=$API_BASE_PATH
RUN npm run build

CMD npm start
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD curl -f http://localhost:$PORT/$API_BASE_PATH/health && curl -f http://localhost:$PORT || exit 1

CMD ["npm", "start"]

0 comments on commit d4c6e77

Please sign in to comment.