Add back health check and fix json file not found

This commit is contained in:
Maidul Islam
2022-12-18 20:10:17 -05:00
parent fbc38c553a
commit 6bb24933bf
3 changed files with 18 additions and 18 deletions
+15 -15
View File
@@ -19,21 +19,21 @@ jobs:
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: 📦 Build backend and export to Docker - name: 📦 Build backend and export to Docker
# uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
# with: with:
# load: true load: true
# context: backend context: backend
# tags: infisical/backend:test tags: infisical/backend:test
# - name: ⏻ Spawn backend container and dependencies - name: ⏻ Spawn backend container and dependencies
# run: | run: |
# docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
# - name: 🧪 Test backend image - name: 🧪 Test backend image
# run: | run: |
# ./.github/resources/healthcheck.sh infisical-backend-test ./.github/resources/healthcheck.sh infisical-backend-test
# - name: ⏻ Shut down backend container and dependencies - name: ⏻ Shut down backend container and dependencies
# run: | run: |
# docker compose -f .github/resources/docker-compose.be-test.yml down docker compose -f .github/resources/docker-compose.be-test.yml down
- name: 🏗️ Build backend and push - name: 🏗️ Build backend and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
+2 -2
View File
@@ -8,8 +8,8 @@ RUN npm ci --only-production --ignore-scripts
COPY . . COPY . .
# HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \ HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
# CMD node healthcheck.js CMD node healthcheck.js
CMD ["npm", "run", "start"] CMD ["npm", "run", "start"]
+1 -1
View File
@@ -34,7 +34,7 @@
"prepare": "cd .. && npm install", "prepare": "cd .. && npm install",
"start": "npm run build && node build/index.js", "start": "npm run build && node build/index.js",
"dev": "nodemon", "dev": "nodemon",
"build": "rimraf ./build && tsc && cp -R ./src/templates ./src/json ./build", "build": "rimraf ./build && tsc && cp -R ./src/templates ./build",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix", "lint-and-fix": "eslint . --ext .ts --fix",
"lint-staged": "lint-staged" "lint-staged": "lint-staged"