Add Infisical secret loading at startup
All checks were successful
Build Docker Image / build (push) Successful in 3m18s

This commit is contained in:
Ruslan Bakiev
2026-03-09 10:00:52 +07:00
parent 27b86c85b7
commit 3169f09672
2 changed files with 49 additions and 2 deletions

View File

@@ -17,12 +17,15 @@ FROM node:22-alpine
WORKDIR /app
COPY package.json ./
RUN npm install --omit=dev
RUN npm install --omit=dev && npm install @infisical/sdk
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/dist ./dist
COPY prisma ./prisma
COPY scripts ./scripts
ENV INFISICAL_SECRET_PATHS="/exchange,/shared"
EXPOSE 8000
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/index.js"]
CMD ["sh", "-c", "node scripts/load-secrets.mjs && . ./.env.infisical && npx prisma migrate deploy && node dist/index.js"]