99AI/Dockerfile
KenGrofork 70fce850c8 简化部署流程
使用docker-compose一键启动
2024-01-23 21:45:25 +08:00

20 lines
284 B
Docker

# 编译阶段
FROM node:18-alpine AS build
WORKDIR /app
COPY . .
# 使用 pnpm 安装项目依赖
RUN npm install -g pnpm
RUN pnpm install
# 运行阶段
FROM node:18-alpine
ENV TZ="Asia/Shanghai"
WORKDIR /app
COPY --from=build /app .
EXPOSE 9520
CMD ["node", "./dist/main.js"]