48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
cpmp:
|
|
image: ghcr.io/wikid82/cpmp:latest
|
|
container_name: cpmp
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80" # HTTP (Caddy proxy)
|
|
- "443:443" # HTTPS (Caddy proxy)
|
|
- "443:443/udp" # HTTP/3 (Caddy proxy)
|
|
- "8080:8080" # Management UI (CPM+)
|
|
environment:
|
|
- CPM_ENV=production
|
|
- TZ=UTC # Set timezone (e.g., America/New_York)
|
|
- CPM_HTTP_PORT=8080
|
|
- CPM_DB_PATH=/app/data/cpm.db
|
|
- CPM_FRONTEND_DIR=/app/frontend/dist
|
|
- CPM_CADDY_ADMIN_API=http://localhost:2019
|
|
- CPM_CADDY_CONFIG_DIR=/app/data/caddy
|
|
- CPM_CADDY_BINARY=caddy
|
|
- CPM_IMPORT_CADDYFILE=/import/Caddyfile
|
|
- CPM_IMPORT_DIR=/app/data/imports
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- cpm_data:/app/data
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro # For local container discovery
|
|
# Mount your existing Caddyfile for automatic import (optional)
|
|
# - ./my-existing-Caddyfile:/import/Caddyfile:ro
|
|
# - ./sites:/import/sites:ro # If your Caddyfile imports other files
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/api/v1/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
cpm_data:
|
|
driver: local
|
|
caddy_data:
|
|
driver: local
|
|
caddy_config:
|
|
driver: local
|