Skip to content

Commit b90eb03

Browse files
committed
updated docker to reflect improvements
1 parent 1d6057d commit b90eb03

File tree

2 files changed

+24
-32
lines changed

2 files changed

+24
-32
lines changed

.dockerignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,11 @@ npm-debug.log
66
.DS_Store
77
.local
88
.env
9-
docs-site
9+
docs-site
10+
src-tauri/target
11+
parts
12+
prime
13+
stage
14+
screenshots
15+
build
16+
docs

Dockerfile

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,34 @@ RUN npm ci --silent
99
COPY . .
1010
RUN 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
1318
FROM node:20-alpine AS runtime
1419
WORKDIR /app
1520

1621
# Install a tiny static server
1722
RUN 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
2025
COPY --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
3227
COPY --from=builder /build/LICENSE ./LICENSE
33-
COPY --from=builder /build/preload.js ./preload.js
3428
COPY --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
4231
EXPOSE 3024
4332

4433
ENV NODE_ENV=production
45-
# Serve the built app on port 3024 using 'serve'
34+
# Serve the built app on port 3024
4635
CMD ["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

Comments
 (0)