首次提交
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user