Files
website/Dockerfile
T
Mikael BergandPaperclip 3616f8923f chore: apply Mikael's Dockerfile and nginx.conf improvements
- Dockerfile: add NEXT_PUBLIC_LOOPS_FORM_ID build arg for Loops waitlist integration
- nginx.conf: add RSS feed MIME type, Permissions-Policy header, remove _next/static
  special case (redundant with static asset catch-all)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 14:02:15 +00:00

24 lines
569 B
Docker

# Stage 1: build
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --prefer-offline --cache /tmp/npm-cache
COPY . .
# Accept build-time env vars (baked into static output)
ARG NEXT_PUBLIC_LOOPS_FORM_ID
ENV NEXT_PUBLIC_LOOPS_FORM_ID=$NEXT_PUBLIC_LOOPS_FORM_ID
RUN npm run build
# Stage 2: serve
FROM nginx:1.27-alpine
COPY --from=builder /app/out /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
CMD wget -qO- http://localhost:8080/ || exit 1