Phase 10, part 9: the server package

compose.server.yaml runs Supermarket behind Caddy (HTTPS from Let's
Encrypt, Caddy's own CA or the team's), with Postgres on an internal
network and a nightly pg_dump kept two weeks. install-server.sh asks for
the domain, certificate and mail server, makes the secret key and database
password, starts it all and prints the setup link. Settings → Backups lists
the dumps on a server, and how the operator restores one. Checked end to
end in Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:37:34 -07:00
co-authored by Claude Opus 5.5
parent c8964cec12
commit da16736fb4
15 changed files with 532 additions and 17 deletions
+4
View File
@@ -24,6 +24,10 @@ FROM alpine:3.22
RUN apk add --no-cache ca-certificates tzdata git
COPY --from=hugo /go/bin/hugo /usr/local/bin/hugo
COPY --from=build /out/supermarket /usr/local/bin/supermarket
# The server edition runs as 10001 (compose.server.yaml): a new volume at
# /data takes this folder's owner. The local edition runs as you, with your
# own folder mounted there instead.
RUN mkdir -p /data /backups && chown 10001:10001 /data
LABEL org.opencontainers.image.title="supermarket"
ENV SUPERMARKET_DATA=/data
EXPOSE 8080