Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nivertius committed Oct 5, 2024
1 parent 96c4924 commit 3eaadc2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
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/

0 comments on commit 3eaadc2

Please sign in to comment.