feat: FRO-28 Integrate Frontend Build as a seperate image (#2)

Reviewed-on: #2
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
This commit is contained in:
2025-12-07 21:30:59 +01:00
committed by Janis
parent 7bc6ac89f0
commit aa399bf035
6 changed files with 70 additions and 1 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM node:lts-alpine3.23 AS builder
WORKDIR /app
COPY package*.json ./
COPY pnpm-lock.yaml* yarn.lock* ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:stable-alpine AS production
RUN apk add --no-cache gettext
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /app/dist /usr/share/nginx/html
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"]