feat: docker enterypoint, dockerfile and dynamic var for buid

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
shahdlala66
2026-05-06 11:32:26 +02:00
parent ff75c8ce2f
commit 29f2127317
10 changed files with 113 additions and 5 deletions
+25
View File
@@ -0,0 +1,25 @@
FROM --platform=$BUILDPLATFORM node:lts-alpine3.23 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM --platform=$TARGETPLATFORM nginx:stable-alpine AS production
RUN apk add --no-cache gettext
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /app/dist/nowchess-frontend/browser /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY public/env.template.js /usr/share/nginx/html/env.template.js
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/docker-entrypoint.sh"]