From 3eaadc2b069c90b269d98cf529aedd8a626335de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20P=C5=82azie=C5=84ski?= Date: Sun, 22 Sep 2024 10:46:27 +0200 Subject: [PATCH] Create Dockerfile --- .dockerignore | 1 + .gitignore | 3 +-- Dockerfile | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/.gitignore b/.gitignore index 87f54738e..8120da161 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ *~ *# -.* update.*.json strings/last-strings.json node_modules/* docs -dist \ No newline at end of file +dist diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..ed5f416f5 --- /dev/null +++ b/Dockerfile @@ -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/ +