Files
linearvoid/infrastructure/nginx/Dockerfile
T
zwitschi 5fc9bc6191
CD / deploy (push) Failing after 1m38s
CI / test (push) Successful in 2m7s
CI / docker (push) Canceled after 0s
CI / release (push) Canceled after 0s
build: integrate frontend build into Nginx Dockerfile, remove separate frontend image
2026-08-03 19:17:53 +02:00

21 lines
451 B
Docker

# 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 infrastructure/nginx/nginx.conf /etc/nginx/nginx.conf
# 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;"]