first
This commit is contained in:
commit
925c5d1ab2
60 changed files with 18843 additions and 0 deletions
34
docker/Dockerfile
Normal file
34
docker/Dockerfile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Build Stage
|
||||
FROM node:lts-alpine AS build-stage
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
# Copy source files and build the app
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Production Stage
|
||||
FROM node:lts-alpine
|
||||
|
||||
ENV NODE_ENV production
|
||||
USER node
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy built app from build stage
|
||||
COPY --from=build-stage /app/dist ./dist
|
||||
|
||||
# Install only production dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci --production
|
||||
|
||||
# Define the entrypoint and default command
|
||||
# If you have a custom entrypoint script
|
||||
CMD [ "node", "dist/app.js" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue