Files
canon/Dockerfile
T
cdnutterandClaude Opus 5.5 3923444b3b Rename project from TopDeck to Canon
- Module github.com/cdnutter/canon, binary/command cmd/canon, Docker
  image and compose project "canon"
- Environment variables now use the CANON_ prefix
- Default site title is "<Your name>'s Canon" (or "Canon" with no name);
  a Site title set in Settings still overrides it
- Existing topdeck.db (and WAL files) is renamed to canon.db on start
- README: upgrade notes, including moving the old compose volume

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 17:22:17 -07:00

24 lines
677 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG VERSION=dev
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" -o /out/canon ./cmd/canon
FROM alpine:3
RUN apk add --no-cache ca-certificates tzdata \
&& adduser -D -u 1000 canon \
&& mkdir -p /data && chown canon:canon /data
COPY --from=build /out/canon /usr/local/bin/canon
USER canon
ENV CANON_DATA_DIR=/data \
CANON_PORT=4242
VOLUME /data
EXPOSE 4242
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
CMD wget -qO- http://127.0.0.1:${CANON_PORT}/healthz >/dev/null || exit 1
ENTRYPOINT ["canon"]