Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile #1222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
*~
*#
.*
update.*.json
strings/last-strings.json
node_modules/*
docs
dist
dist
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM --platform=$BUILDPLATFORM node:20-alpine as builder

WORKDIR /app
COPY . .

RUN npm install
RUN npm run build

FROM nginx:1.27.1-alpine3.20-slim

COPY --from=builder /app/lib/ /usr/share/nginx/html/lib/
COPY --from=builder /app/font/ /usr/share/nginx/html/font/
COPY --from=builder /app/evolved.ico /app/evolved-light.ico /usr/share/nginx/html/
COPY --from=builder /app/index.html /app/save.html /app/wiki.html /usr/share/nginx/html/
COPY --from=builder /app/strings/ /usr/share/nginx/html/strings/
COPY --from=builder /app/evolve/ /usr/share/nginx/html/evolve/