@@ -2,26 +2,27 @@ FROM node:20 AS builder
22
33USER root
44
5- WORKDIR /app
5+ WORKDIR /out
6+
7+ COPY package*.json ./
8+ COPY tsconfig.json tsconfig.publish.json proxy.config.json config.schema.json test-e2e.proxy.config.json vite.config.ts index.html index.ts ./
9+
10+ RUN npm pkg delete scripts.prepare && npm ci --include=dev
611
7- COPY tsconfig.json tsconfig.publish.json proxy.config.json config.schema.json test-e2e.proxy.config.json vite.config.ts package*.json index.html index.ts ./
8- COPY src/ /app/src/
9- COPY public/ /app/public/
12+ COPY src/ /out/src/
13+ COPY public/ /out/public/
1014
11- # Build the UI and server
12- RUN npm pkg delete scripts.prepare \
13- && npm ci --include=dev \
14- && npm run build-ui -dd \
15+ RUN npm run build-ui \
1516 && npx tsc --project tsconfig.publish.json \
1617 && cp config.schema.json dist/ \
1718 && npm prune --omit=dev
1819
1920FROM node:20 AS production
2021
21- COPY --from=builder /app /package*.json ./
22- COPY --from=builder /app /node_modules/ /app/node_modules/
23- COPY --from=builder /app /dist/ /app/dist/
24- COPY --from=builder /app /build /app/dist/build/
22+ COPY --from=builder /out /package*.json ./
23+ COPY --from=builder /out /node_modules/ /app/node_modules/
24+ COPY --from=builder /out /dist/ /app/dist/
25+ COPY --from=builder /out /build /app/dist/build/
2526COPY proxy.config.json config.schema.json ./
2627COPY docker-entrypoint.sh /docker-entrypoint.sh
2728
@@ -31,8 +32,8 @@ RUN apt-get update && apt-get install -y \
3132 git tini \
3233 && rm -rf /var/lib/apt/lists/*
3334
34- RUN mkdir -p /app/.data /app/.tmp \
35- && chown 1000:1000 /app/dist/build /app/.data /app/.tmp
35+ RUN mkdir -p /app/.data /app/.tmp /app/.remote \
36+ && chown -R 1000:1000 /app
3637
3738USER 1000
3839
@@ -41,4 +42,4 @@ WORKDIR /app
4142EXPOSE 8080 8000
4243
4344ENTRYPOINT ["tini" , "--" , "/docker-entrypoint.sh" ]
44- CMD ["node" , "dist/index.js" ]
45+ CMD ["node" , "--enable-source-maps" , " dist/index.js" ]
0 commit comments