@@ -9,49 +9,34 @@ RUN npm ci --silent
99COPY . .
1010RUN npm run build
1111
12- # Runtime stage: small image that only serves the built dist and includes requested files
12+ # Make sure metadata files are included in the served 'dist' folder for the About Modal
13+ RUN cp package.json dist/ && \
14+ mkdir -p dist/release && \
15+ cp release/latest.json dist/release/
16+
17+ # Runtime stage: minimal image to serve the compiled app
1318FROM node:20-alpine AS runtime
1419WORKDIR /app
1520
1621# Install a tiny static server
1722RUN npm install -g serve --no-audit --no-fund --silent
1823
19- # Copy the build output and the specific files/dirs you requested
24+ # Copy ONLY the built artifacts
2025COPY --from=builder /build/dist ./dist
21- # Copy additional files/dirs to include in the image (as requested)
22- COPY --from=builder /build/src ./src
23- COPY --from=builder /build/about ./about
24- COPY --from=builder /build/release ./release
25- COPY --from=builder /build/src/assets ./src/assets
26- COPY --from=builder /build/src/autoGenerator ./src/autoGenerator
27- COPY --from=builder /build/src/components ./src/components
28- COPY --from=builder /build/src/templates ./src/templates
29- COPY --from=builder /build/public ./public
30- COPY --from=builder /build/screenshots ./screenshots
31- COPY --from=builder /build/index.html ./index.html
26+ # Keep essential metadata
3227COPY --from=builder /build/LICENSE ./LICENSE
33- COPY --from=builder /build/preload.js ./preload.js
3428COPY --from=builder /build/package.json ./package.json
35- COPY --from=builder /build/tsconfig.app.json ./tsconfig.app.json
36- COPY --from=builder /build/tsconfig.json ./tsconfig.json
37- COPY --from=builder /build/tsconfig.node.json ./tsconfig.node.json
38- COPY --from=builder /build/vite.config.ts ./vite.config.ts
39- COPY --from=builder /build/main.cjs ./main.cjs
4029
41- # Expose the Vite/preview port
30+ # Expose the app port
4231EXPOSE 3024
4332
4433ENV NODE_ENV=production
45- # Serve the built app on port 3024 using 'serve'
34+ # Serve the built app on port 3024
4635CMD ["serve" , "-s" , "dist" , "-l" , "3024" ]
4736
48- # BUILD PROD
49- # docker build -f Dockerfile.prod -t gcclinux/easyedit:1.3.8 .
50- # RUN
51- # docker run --name EASYEDIT --rm -p 3024:3024 gcclinux/easyedit:1.3.8
52- # or to run in background (detached)
53- # docker run -d --name EASYEDIT -p 3024:3024 gcclinux/easyedit:1.3.8
54- # To stop
55- # docker stop EASYEDIT
56- # To remove (only if not started with --rm)
57- # docker rm EASYEDIT
37+ # BUILD:
38+ # docker build -t gcclinux/easyedit:1.5.2 .
39+ # RUN:
40+ # docker run --name EASYEDIT --rm -p 3024:3024 gcclinux/easyedit:1.5.2
41+ # CONFIGURE:
42+ # docker run -d --name EASYEDIT --rm -p 3024:3024 gcclinux/easyedit:1.5.2
0 commit comments