Compare commits

...

2 Commits

2 changed files with 19 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
FROM node:lts-alpine3.23 AS builder FROM --platform=$BUILDPLATFORM node:lts-alpine3.23 AS builder
WORKDIR /app WORKDIR /app
@@ -9,13 +9,15 @@ RUN npm install
COPY . . COPY . .
RUN npm run build RUN npm run build
FROM nginx:stable-alpine AS production FROM --platform=$TARGETPLATFORM nginx:stable-alpine AS production
RUN apk add --no-cache gettext RUN apk add --no-cache gettext
RUN rm -rf /usr/share/nginx/html/* RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /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 public/env.template.js /usr/share/nginx/html/env.template.js
COPY docker-entrypoint.sh /docker-entrypoint.sh COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh

15
nginx.conf Normal file
View File

@@ -0,0 +1,15 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}