build: integrate frontend build into Nginx Dockerfile, remove separate frontend image
CD / deploy (push) Failing after 1m38s
CI / test (push) Successful in 2m7s
CI / docker (push) Canceled after 0s
CI / release (push) Canceled after 0s

This commit is contained in:
zwitschi committed 2026-08-03 19:17:53 +02:00
1 parent 3c2b29ad26
commit 5fc9bc6191
4 files changed
+21 -47

No files matched your search

+15 -3
View File
@@ -1,9 +1,21 @@
# Stage 1: Build frontend
FROM node:20-alpine AS builder
WORKDIR /build
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# Stage 2: Nginx with bundled frontend
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY infrastructure/nginx/nginx.conf /etc/nginx/nginx.conf
# Create directories for HLS and frontend
RUN mkdir -p /srv/frontend /srv/hls /srv/frontend/admin
# Copy prebuilt frontend from builder stage
COPY --from=builder /build/dist/ /srv/frontend/
# Create HLS directory
RUN mkdir -p /srv/hls
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]