mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 22:27:22 +00:00
Builds Docker image of backend component with multi-stage Dockerfile
Updates package.json `npm start` command Delete unnecessary `npm run start` commands Signed-off-by: Shakar <[email protected]>
This commit is contained in:
+16
-6
@@ -1,18 +1,28 @@
|
||||
FROM node:16-bullseye-slim AS build
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci --only-production --ignore-scripts
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
|
||||
FROM node:16-bullseye-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# RUN npm ci --only-production --ignore-scripts
|
||||
# "prepare": "cd .. && npm install"
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci --only-production
|
||||
|
||||
COPY . .
|
||||
COPY --from=build /app .
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
|
||||
CMD node healthcheck.js
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
CMD ["npm", "run", "start"]
|
||||
|
||||
Reference in New Issue
Block a user