Install
Docker Compose
deploy/compose contains a ready-to-use setup:
cd deploy/compose
cp .env.example .env && chmod 600 .env
# edit .env: PUBLIC_URL, MASTER_KEY, ALLOWED_EMAILS, DOMAIN
docker compose --profile caddy up -dThe caddy profile adds Caddy, which obtains a
certificate for DOMAIN automatically (ports 80 and 443 must be reachable,
and DNS must point at the machine). Without the profile, the app listens on
127.0.0.1:8080 for your own reverse proxy.
Upgrade with docker compose pull && docker compose up -d. Pin
IMAGE_TAG to a version (for example 0.3.2) for predictable upgrades.
The Compose file and Caddyfile in the repository state the following.
- The image is
postkeep/postkeep:${IMAGE_TAG:-latest}. - Required environment:
PUBLIC_URL(POSTKEEP_PUBLIC_URL),MASTER_KEY(POSTKEEP_MASTER_KEY).ALLOWED_EMAILSmaps toPOSTKEEP_ALLOWED_EMAILS.DOMAINis required when thecaddyprofile is used. POSTKEEP_CLIENT_IP_HEADERcomes fromCLIENT_IP_HEADER. The bundled Caddy setsX-Forwarded-For.POSTKEEP_LOGcomes fromLOG(defaultinfo).- PostgreSQL is commented out:
POSTKEEP_DATABASE_URL: postgres://postkeep:${POSTGRES_PASSWORD}@postgres/postkeep. - The app publishes
127.0.0.1:8080:8080. - The
caddyservice is behind profilecaddy, usescaddy:2, and publishes80:80,443:443and443:443/udp. - The Caddyfile reverse-proxies
{$DOMAIN}topostkeep:8080.
See the deployment overview for the surrounding requirements.