Add read-only web UI
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.
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,8 +1,17 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
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
|
||||
@@ -10,4 +19,5 @@ 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"]
|
||||
|
||||
Reference in New Issue
Block a user