File size: 455 Bytes
82dc79b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# 使用基础Node.js镜像
FROM node:20-alpine3.18
# 安装git
RUN apk add --no-cache git
# 设置工作目录
WORKDIR /app
# 克隆代码
RUN git clone https://github.com/aston314/backend.git .
# 复制package文件
COPY package*.json ./
# 安装依赖
#RUN npm ci
RUN npm install
# Expose port
ARG PORT=7860
ENV PORT=${PORT}
EXPOSE ${PORT}
# Add api key
ENV TMDB_API_KEY=ea021b3b0775c8531592713ab727f254
# 启动应用
CMD ["npm", "start"]
|