Files
ClassHomeworkBoard/docker-server/Dockerfile
T
Henry_Du c7fdc11dbd
Azure Static Web Apps CI/CD / Close Pull Request Job (push) Skipped
Build and Deploy / build (push) Failing after 9m48s
Azure Static Web Apps CI/CD / Build and Deploy Job (push) Failing after 9m50s
首次提交
2026-10-24 01:29:24 +08:00

23 lines
376 B
Docker

FROM node:18-alpine
WORKDIR /app
# Copy package files and install production dependencies
COPY package*.json ./
RUN npm install --production
# Copy server code
COPY server.js ./
# Copy the pre-built frontend files
COPY dist ./dist
# Create a data directory to store JSON files locally
RUN mkdir -p data
# Expose port
EXPOSE 3001
# Start the server
CMD ["npm", "start"]