Files
yunrui_asset/backend/Dockerfile
T
yi e9bff9beb3
Build and Push Docker Images / Build Backend Image (push) Has been cancelled
Build and Push Docker Images / Build Frontend Image (push) Has been cancelled
Build and Push Docker Images / Notify Build Complete (push) Has been cancelled
Update 2026-06-23 10:40:10
2026-06-23 10:40:10 +08:00

35 lines
694 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
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
# 基于 Node.js 20 Alpine 构建
# ============================================
FROM node:20-alpine
# 设置工作目录
WORKDIR /app
# 安装系统依赖(如需编译原生模块)
RUN apk add --no-cache tzdata
# 设置时区
ENV TZ=Asia/Shanghai
# 复制依赖配置文件
COPY package.json ./
COPY package-lock.json* yarn.lock* ./
# 安装生产依赖(不安装 devDependencies
RUN npm install --omit=dev
# 复制后端代码
COPY . .
# 确保日志和上传目录存在
RUN mkdir -p logs uploads temp backups
# 暴露端口
EXPOSE 8000
# 启动命令
CMD ["node", "server.js"]