Update Dockerfile
Browse files123456785 unmodified lines1415161718192021FROM node:lts AS BUILD_IMAGEWORKDIR /appCOPY . /appRUN yarn install --registry https://registry.npmmirror.com/ && yarn run build5 unmodified linesCOPY --from=BUILD_IMAGE /app/public /app/publicCOPY --from=BUILD_IMAGE /app/node_modules /app/node_modulesWORKDIR /appEXPOSE 8000CMD ["npm", "start"]1234567891011125 unmodified lines1819202122232425262728293031323334FROM node:lts AS BUILD_IMAGE# Update the package list and install gitRUN apt-get update && apt-get install -y gitWORKDIR /app# Pull GitHub repositoryRUN git clone https://github.com/LLM-Red-Team/glm-free-api.git /appRUN yarn install --registry https://registry.npmmirror.com/ && yarn run build5 unmodified linesCOPY --from=BUILD_IMAGE /app/public /app/publicCOPY --from=BUILD_IMAGE /app/node_modules /app/node_modules# Install production dependenciesRUN yarn install --production --registry https://registry.npmmirror.com/# Create the log directory and grant write permissionsRUN mkdir -p /app/logs && chmod 777 /app/logs# Specify port environment variableENV PORT 7860# Expose portEXPOSE $PORT# Specify the command to be executed when the container startsCMD ["node", "dist/index.js", "--port", "7860"]
Dockerfile+17-4