Files
pad/docker-compose.yml
T
xarmian af2755d5af docs: add deployment documentation, Docker Compose, and K8s manifests
Provide production-ready deployment configurations:
- docker-compose.yml: Pad + PostgreSQL + Redis single-command setup
- docker-compose.prod.yml: production overlay with resource limits
- deploy/k8s/: Kubernetes manifests (deployment, service, ingress, HPA)
- deploy/Caddyfile: Caddy reverse proxy with auto-TLS
- deploy/nginx.conf: nginx config with SSE-friendly proxy settings
- docs/deployment.md: environment variable reference, architecture
  diagram, quick start, production checklist
2026-04-06 01:58:04 +00:00

69 lines
1.7 KiB
YAML

# Pad — local production setup with PostgreSQL + Redis
# Usage: docker compose up -d
#
# Starts Pad with PostgreSQL for storage and Redis for real-time events.
# Access the web UI at http://localhost:7777
# First-time setup: visit the UI or run `pad auth setup` from a local CLI.
services:
pad:
build:
context: .
dockerfile: Dockerfile
ports:
- "7777:7777"
environment:
PAD_HOST: "0.0.0.0"
PAD_PORT: "7777"
PAD_DB_DRIVER: "postgres"
PAD_DATABASE_URL: "postgres://pad:pad@postgres:5432/pad?sslmode=disable"
PAD_REDIS_URL: "redis://redis:6379"
PAD_DATA_DIR: "/data"
PAD_LOG_LEVEL: "info"
volumes:
- pad-data:/data
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:7777/api/v1/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
postgres:
image: postgres:17-alpine
environment:
POSTGRES_USER: pad
POSTGRES_PASSWORD: pad
POSTGRES_DB: pad
volumes:
- pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pad"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --maxmemory 64mb --maxmemory-policy allkeys-lru
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
volumes:
pad-data:
pg-data:
redis-data: