oweme/compose.yaml
agent 04d952872d Make the deploy panel-friendly: zero-config compose, env vars with defaults
- compose.yaml runs only the app by default; Caddy moved to the
  'standalone' profile (the panel brings its own Caddy and routes).
- No env_file: every setting is ${VAR:-default} in compose.yaml, so it
  can be set from the panel's Environment tab (or .env standalone).
- VAPID keys are generated on first start and kept in the data volume;
  the push subject defaults to https://<site domain>. gen-vapid.ts removed.
- PUSH_DISABLED=1 turns push off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
2026-10-09 22:24:22 +00:00

75 lines
2.7 KiB
YAML

# OweMe. Works as-is with zero configuration; every setting below can be
# overridden with an environment variable (in the panel's Environment tab,
# or in a .env file next to this file).
#
# With the panel: point the app's domain at service `app`, port 8080.
# The panel's Caddy provides HTTPS.
# Standalone (no panel): set DOMAIN and run
# podman compose --profile standalone up -d --build
# which adds a Caddy container with automatic HTTPS. See deploy/README.md.
name: oweme
services:
app:
build:
context: .
dockerfile: deploy/Containerfile
image: localhost/oweme:latest
restart: unless-stopped
environment:
# Max size of one uploaded (encrypted) photo, in bytes. Default 2 MB.
MAX_PHOTO_BYTES: ${MAX_PHOTO_BYTES:-2097152}
# Max size of one encrypted event, in bytes. Default 64 KB.
MAX_EVENT_BYTES: ${MAX_EVENT_BYTES:-65536}
# Storage cap per group (events + photos), in bytes. Default 200 MB.
MAX_GROUP_BYTES: ${MAX_GROUP_BYTES:-209715200}
# New groups per client IP per hour.
GROUP_CREATE_PER_HOUR: ${GROUP_CREATE_PER_HOUR:-10}
# Contact sent to push services, e.g. mailto:you@example.com.
# Empty = https://<the site's domain>.
VAPID_SUBJECT: ${VAPID_SUBJECT:-}
# Push keys. Empty = generated on first start and kept in the data
# volume (recommended). Set both only to pin specific keys.
VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY:-}
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
# 1 = turn push notifications off.
PUSH_DISABLED: ${PUSH_DISABLED:-0}
# Fixed for the container; no need to change these.
HOST: 0.0.0.0
PORT: "8080"
DATA_DIR: /data
STATIC_DIR: /app/web
TRUST_PROXY: "1"
volumes:
- oweme-data:/data
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/api/health"]
interval: 30s
timeout: 5s
# No ports: the panel publishes 8080 for its routes; standalone, only
# Caddy reaches the app.
caddy:
profiles: [standalone]
image: docker.io/library/caddy:2.10.2-alpine
restart: unless-stopped
depends_on:
- app
environment:
# Public hostname for standalone HTTPS (needs a DNS record).
DOMAIN: ${DOMAIN:-localhost}
ports:
# Rootless Podman can't bind ports below 1024 by default; see
# deploy/README.md "Ports".
- "${BIND_ADDR:-0.0.0.0}:${HTTP_PORT:-80}:80"
- "${BIND_ADDR:-0.0.0.0}:${HTTPS_PORT:-443}:443"
- "${BIND_ADDR:-0.0.0.0}:${HTTPS_PORT:-443}:443/udp"
volumes:
- ./deploy/Caddyfile:/etc/caddy/Caddyfile:ro,Z
- caddy-data:/data
- caddy-config:/config
volumes:
oweme-data:
caddy-data:
caddy-config: