T01: update backend Dockerfile

This commit is contained in:
2026-06-21 20:33:37 +00:00
parent e4af170498
commit f1b3d2e136
+14 -4
View File
@@ -1,13 +1,23 @@
# Use Node.js 22 LTS as base image
FROM node:22-alpine FROM node:22-alpine
RUN apk add --no-cache curl
# Set working directory
WORKDIR /app WORKDIR /app
# Copy package files
COPY package*.json ./ COPY package*.json ./
RUN npm ci --only=production
# Install dependencies
RUN npm ci
# Copy source code
COPY . . COPY . .
EXPOSE 5000 # Build the application
RUN npm run build
CMD ["node", "server.js"] # Expose port 3001
EXPOSE 3001
# Run the application
CMD ["npm", "start"]