Serves Pete's classified-story archive over HTTP alongside the Matrix
bot. Three sections (gaming/tech/politics), Animal-Crossing-vibe Tailwind
templates, day/night palette driven by the visitor's browser clock.
Web port configurable via web.listen_addr and ${PETE_WEB_PORT} in
docker-compose. Tailwind built in a node stage in the Dockerfile so
deployments don't need node at runtime.
24 lines
707 B
Docker
24 lines
707 B
Docker
FROM node:20-alpine AS css
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install --no-audit --no-fund
|
|
COPY tailwind.config.js ./
|
|
COPY internal/web ./internal/web
|
|
RUN npx tailwindcss -i internal/web/static/css/input.css -o internal/web/static/css/output.css --minify
|
|
|
|
FROM golang:1.25-alpine AS builder
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
COPY --from=css /app/internal/web/static/css/output.css ./internal/web/static/css/output.css
|
|
RUN CGO_ENABLED=0 go build -tags goolm -o pete .
|
|
|
|
FROM alpine:3.21
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
WORKDIR /app
|
|
COPY --from=builder /app/pete .
|
|
VOLUME /app/data
|
|
EXPOSE 8080
|
|
CMD ["./pete", "-config", "/app/config.yaml"]
|