Spaces:
Sleeping
Sleeping
| FROM node:lts AS BUILD_IMAGE | |
| WORKDIR /app | |
| RUN apt-get update && \ | |
| apt-get install -y git && \ | |
| git clone https://github.com/LLM-Red-Team/deepseek-free-api.git /app && \ | |
| apt-get remove -y git && \ | |
| apt-get autoremove -y | |
| RUN ls /app | |
| RUN sed -i "s|prefix: '/v1/chat',|prefix: '/api/v1/chat',|g" /app/src/api/routes/chat.ts | |
| RUN sed -i "s|prefix: '/v1',|prefix: '/api/v1',|g" /app/src/api/routes/models.ts | |
| RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build | |
| FROM node:lts-alpine | |
| COPY --from=BUILD_IMAGE /app/configs /app/configs | |
| COPY --from=BUILD_IMAGE /app/package.json /app/package.json | |
| COPY --from=BUILD_IMAGE /app/dist /app/dist | |
| COPY --from=BUILD_IMAGE /app/public /app/public | |
| COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules | |
| WORKDIR /app | |
| RUN chmod -R 777 /app | |
| EXPOSE 8000 | |
| CMD ["npm", "start"] |