qwn2a / Dockerfile
rr1's picture
Update Dockerfile
17a5049 verified
raw
history blame contribute delete
457 Bytes
FROM node:lts-alpine
# 全局安装PM2
#RUN npm install -g pm2
RUN apk add --no-cache git
RUN git clone https://github.com/Rfym21/Qwen2API.git /app
WORKDIR /app
# 复制package文件
# 安装依赖
RUN npm install
# 复制应用代码
# 设置权限
RUN chmod 777 /app
# 创建日志目录
RUN mkdir -p logs
# 暴露端口(通过环境变量SERVICE_PORT控制)
EXPOSE 3000
# 使用PM2启动应用,并保持容器运行
CMD ["npm", "start"]