SQLite replaces Postgres, and two fixes from using the thing. - The database is a file under ./storage instead of a second container. Ten members never needed a database server, and the driver is pure Go, so the build stays CGO_ENABLED=0 and the dependency count is unchanged. One bind mount is now the whole backup: no pgdata, no healthcheck-gated depends_on, no startup retry loop. Timestamps are UTC text, idle_ttl is seconds, the divisive/unified boards carry their own stddev, and foreign keys are on by pragma. Tests get a database file each and run without any setup - Invites are copied, not clicked. An invite is something to send, and the anchor opened the join form in the admin's own browser - Feedback asks for more than faults: the footer reads "Ongelmia? Ideoita? Palautetta?" and the page behind it invites ideas rather than only bugs - Kuuntele YouTubessa opens in a new tab, so a half-typed review survives it
20 lines
871 B
Docker
20 lines
871 B
Docker
FROM golang:1.26-alpine AS build
|
|
# CalVer, injected at build so no file needs bumping by hand: docker build --build-arg VERSION=…
|
|
ARG VERSION=dev
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -o /levyraati .
|
|
|
|
FROM alpine:3.24
|
|
# yt-dlp rots against YouTube. Alpine's active branch tracks it closely (3.24 carries the current
|
|
# release), so a rebuild is the update — and this avoids python3 + pip in the image entirely.
|
|
# sqlite is the CLI only — the app links its own pure-Go copy. It is here so `.backup` and a shell
|
|
# are reachable with docker compose exec, which is the whole of database operations now.
|
|
RUN apk add --no-cache ffmpeg yt-dlp ca-certificates sqlite
|
|
COPY --from=build /levyraati /usr/local/bin/levyraati
|
|
ENV STORAGE_DIR=/storage
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["levyraati"]
|