2ch commited on
Commit
d0d4c08
·
verified ·
1 Parent(s): 2b08347

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -4
Dockerfile CHANGED
@@ -1,8 +1,6 @@
1
  FROM node:lts AS BUILD_IMAGE
2
 
3
  WORKDIR /app
4
-
5
- # 更新软件包源,安装git,然后删除不再需要的包和缓存
6
  RUN apt-get update && \
7
  apt-get install -y git && \
8
  git clone https://github.com/LLM-Red-Team/deepseek-free-api.git /app && \
@@ -10,7 +8,6 @@ RUN apt-get update && \
10
  apt-get autoremove -y
11
 
12
  RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
13
-
14
  FROM node:lts-alpine
15
 
16
 
@@ -19,7 +16,8 @@ COPY --from=BUILD_IMAGE /app/package.json /app/package.json
19
  COPY --from=BUILD_IMAGE /app/dist /app/dist
20
  COPY --from=BUILD_IMAGE /app/public /app/public
21
  COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
22
-
 
23
  WORKDIR /app
24
 
25
  RUN chmod -R 777 /app
 
1
  FROM node:lts AS BUILD_IMAGE
2
 
3
  WORKDIR /app
 
 
4
  RUN apt-get update && \
5
  apt-get install -y git && \
6
  git clone https://github.com/LLM-Red-Team/deepseek-free-api.git /app && \
 
8
  apt-get autoremove -y
9
 
10
  RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
 
11
  FROM node:lts-alpine
12
 
13
 
 
16
  COPY --from=BUILD_IMAGE /app/dist /app/dist
17
  COPY --from=BUILD_IMAGE /app/public /app/public
18
  COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
19
+ RUN sed -i "s|prefix: '/v1/chat',|prefix: '/api/v1/chat',|g" /app/src/api/routes/chat.ts
20
+ RUN sed -i "s|prefix: '/v1',|prefix: '/api/v1',|g" /app/src/api/routes/models.ts
21
  WORKDIR /app
22
 
23
  RUN chmod -R 777 /app