Spaces:
Running
Running
ffreemt
commited on
Commit
•
8fd5bce
1
Parent(s):
c514055
Update back to old Dockerfile
Browse files- .gitignore +1 -0
- Dockerfile +8 -16
.gitignore
CHANGED
@@ -3,3 +3,4 @@ dist
|
|
3 |
logs
|
4 |
dist/
|
5 |
Dockerfile-copy
|
|
|
|
3 |
logs
|
4 |
dist/
|
5 |
Dockerfile-copy
|
6 |
+
Dockerfile-new
|
Dockerfile
CHANGED
@@ -1,21 +1,13 @@
|
|
1 |
-
FROM node:18-bullseye-slim
|
2 |
-
|
3 |
-
WORKDIR /app
|
4 |
-
COPY . .
|
5 |
-
|
6 |
-
RUN yarn install && yarn run build
|
7 |
-
|
8 |
-
FROM node:lts-alpine
|
9 |
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
10 |
|
11 |
-
COPY --from=BUILD_IMAGE /app/configs /app/configs
|
12 |
-
COPY --from=BUILD_IMAGE /app/package.json /app/package.json
|
13 |
-
COPY --from=BUILD_IMAGE /app/dist /app/dist
|
14 |
-
COPY --from=BUILD_IMAGE /app/public /app/public
|
15 |
-
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
|
16 |
-
|
17 |
WORKDIR /app
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
EXPOSE 7860
|
20 |
-
|
|
|
21 |
CMD [ "npm", "start" ]
|
|
|
1 |
+
FROM node:18-bullseye-slim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
WORKDIR /app
|
5 |
+
COPY . .
|
6 |
+
RUN chown -R 1000:1000 /app
|
7 |
+
USER 1000
|
8 |
+
RUN npm install
|
9 |
+
RUN npm run build
|
10 |
EXPOSE 7860
|
11 |
+
ENV NODE_ENV=production
|
12 |
+
ENV NODE_OPTIONS="--max-old-space-size=12882"
|
13 |
CMD [ "npm", "start" ]
|