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/ +