# 使用基础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"]