Docker-AIO: one image per database

Dockerfile builds warp-aio on SQLite, Dockerfile.PocketBase builds
warp-aio-pocketbase and Dockerfile.PostgreSQL builds warp-aio-postgresql
with PostgreSQL bundled. The database driver and connection string now
come from the image, so the SQLite and PocketBase images no longer carry
PostgreSQL (103 MB instead of 149 MB). The AIO compose files point at
their own Dockerfile and image, and the entrypoint refuses to start an
embedded PostgreSQL in an image that has none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 5.5 committed 2026-10-22 20:22:24 +02:00
1 parent b8d692bac5
commit 89f89b5d36
12 files changed
+275 -59

No files matched your search

+5 -9
View File
@@ -1,5 +1,6 @@
# warp-aio — the homeserver, the admin panel and the web client in one
# image, with PostgreSQL bundled for those who want it inside too.
# image, on SQLite. Dockerfile.PostgreSQL and Dockerfile.PocketBase are the
# same image on the other databases.
#
# Build from the repository root:
#
@@ -7,10 +8,7 @@
# docker run -p 8008:8008 -p 8009:8009 -p 8080:8080 -v warp-data:/data \
# -e WARP_SERVER_NAME=warp.example warp-aio
#
# The database is picked the same way as for the homeserver alone, with
# WARP_DB_DRIVER (sqlite, the default, pocketbase or postgres).
# WARP_AIO_EMBEDDED_POSTGRES=true starts the bundled PostgreSQL in the
# container, its data in /data/postgres; see Docker-AIO/entrypoint.sh.
# The database, signing key and media live in /data; mount a volume on it.
FROM node:22-alpine AS web
@@ -71,10 +69,8 @@ RUN cd apps/web && GOWORK=off go build -trimpath -ldflags "-s -w -X main.version
FROM alpine:3.21
# tini is PID 1 so signals reach the entrypoint and zombies are reaped.
# PostgreSQL runs as the same unprivileged user as everything else.
RUN apk add --no-cache ca-certificates tzdata curl tini postgresql17 postgresql17-client && \
adduser -D -u 10001 -h /data warp && \
mkdir -p /run/postgresql && chown warp:warp /run/postgresql
RUN apk add --no-cache ca-certificates tzdata curl tini && \
adduser -D -u 10001 -h /data warp
COPY --from=build /out/warp /out/warp-admin /out/warp-web /usr/local/bin/
COPY warp.yaml.example /etc/warp/warp.yaml.example