- Parse templates once at startup instead of on every request - Add security headers (X-Content-Type-Options, X-Frame-Options, etc.) - Add per-request logging (IP, method, path, status, size, duration, referer, user-agent) — no PII in logs - Add /healthz endpoint and graceful shutdown (SIGTERM) - Validate waitlist emails and return proper errors on render failure - Remove ~1700 lines of duplicate CSS appended to style.css - Fix contribute grid (auto-fill → auto-fit for 3-card balance) - Add accent color to contribute icons so SVGs are visible - Center section headings, descriptions, waitlist form, and edition teaser - Add Inter and JetBrains Mono Google Fonts - Update hero and edition teaser copy to \"in development\" - Add wget to Dockerfile for container healthcheck - Point docker-compose healthcheck at /healthz - Add .gitignore for build artifacts Signed-off-by: Blake Ridgway <blake@blakeridgway.com>
35 lines
948 B
Docker
35 lines
948 B
Docker
# ── Stage 1: Build ─────────────────────────────────────────────────────────
|
|
FROM golang:1.26-alpine AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
COPY go.* ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o landing .
|
|
|
|
# ── Stage 2: Runtime ────────────────────────────────────────────────────────
|
|
FROM alpine:3.21 AS runtime
|
|
|
|
RUN apk add --no-cache ca-certificates wget && \
|
|
addgroup -S arcline && \
|
|
adduser -S -G arcline arcline
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /build/landing ./
|
|
COPY --from=builder /build/static ./static
|
|
COPY --from=builder /build/templates ./templates
|
|
|
|
RUN chown -R arcline:arcline /app
|
|
|
|
USER arcline
|
|
|
|
ENV PORT=8080
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["./landing"]
|