This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 后端 Dockerfile
FROM node:18-alpine
WORKDIR /app
# 复制package文件
COPY package*.json ./
# 安装依赖(使用 install 而不是 ci)
RUN npm install --only=production
# 复制源代码
COPY src ./src
# 创建数据库目录
RUN mkdir -p /app/database
# 暴露端口
EXPOSE 5000
# 启动应用
CMD ["node", "src/index.js"]