Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add back health check and fix json file not found

Maidul Islam6bb24933bfd1
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index f214272e42..1e836a1782 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -19,21 +19,21 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- # - name: 📦 Build backend and export to Docker
- # uses: docker/build-push-action@v3
- # with:
- # load: true
- # context: backend
- # tags: infisical/backend:test
- # - name: ⏻ Spawn backend container and dependencies
- # run: |
- # docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
- # - name: 🧪 Test backend image
- # run: |
- # ./.github/resources/healthcheck.sh infisical-backend-test
- # - name: ⏻ Shut down backend container and dependencies
- # run: |
- # docker compose -f .github/resources/docker-compose.be-test.yml down
+ - name: 📦 Build backend and export to Docker
+ uses: docker/build-push-action@v3
+ with:
+ load: true
+ context: backend
+ tags: infisical/backend:test
+ - name: ⏻ Spawn backend container and dependencies
+ run: |
+ docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
+ - name: 🧪 Test backend image
+ run: |
+ ./.github/resources/healthcheck.sh infisical-backend-test
+ - name: ⏻ Shut down backend container and dependencies
+ run: |
+ docker compose -f .github/resources/docker-compose.be-test.yml down
- name: 🏗️ Build backend and push
uses: docker/build-push-action@v3
with:
diff --git a/backend/Dockerfile b/backend/Dockerfile
index d29d93ce8d..85b7204fec 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -8,8 +8,8 @@ RUN npm ci --only-production --ignore-scripts
COPY . .
-# HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
-# CMD node healthcheck.js
+HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
+ CMD node healthcheck.js
CMD ["npm", "run", "start"]
diff --git a/backend/package.json b/backend/package.json
index 5e1793bfe7..bad2908d9a 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -34,7 +34,7 @@
"prepare": "cd .. && npm install",
"start": "npm run build && node build/index.js",
"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-and-fix": "eslint . --ext .ts --fix",
"lint-staged": "lint-staged"