Réécriture complète 4.0
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6m16s
This commit is contained in:
24
build/node.dockerfile
Normal file
24
build/node.dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Starting from node
|
||||
FROM node:22-alpine
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
# Copy package files and install only production dependencies
|
||||
COPY package.json package-lock.json* .
|
||||
RUN npm ci --only=production --ignore-scripts && \
|
||||
npm install bufferutil zlib-sync
|
||||
|
||||
|
||||
# Copy the builded files and the charts
|
||||
COPY ./dist/* .
|
||||
|
||||
# Set the permissions
|
||||
RUN chown -R node:node /app
|
||||
USER node
|
||||
|
||||
# Start the application
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user