This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repository is a collection of Docker Compose templates designed for deployment on the ZaneOps platform. Each YAML file represents a self-contained service stack with its dependencies (databases, caches, etc.).
Each .yml file in the root directory is a standalone Docker Compose template for a specific application. Templates follow a consistent pattern:
-
x-zane-env section: Defines environment variables with templating syntax
{{ generate_domain }}: Placeholder for auto-generated domains{{ generate_password | N }}: Placeholder for auto-generated passwords (N = character length){{ generate_email }}: Placeholder for auto-generated email addresses
-
services section: Defines all containers needed for the application
- Main application service(s)
- Supporting services (PostgreSQL, Redis, ClickHouse, etc.)
- Each service includes healthchecks for reliability
-
deploy.labels: ZaneOps-specific routing configuration
zane.http.routes.N.domain: Domain mapping for the servicezane.http.routes.N.base_path: URL path routingzane.http.routes.N.port: Internal container portzane.http.routes.N.strip_prefix: Whether to strip the base path before forwarding
-
volumes: Named volumes for data persistence
-
configs (optional): Inline configuration files mounted into containers
- Templates use Docker Compose 3.8 format
- Environment variables are referenced using
${VAR_NAME}syntax - Multi-container applications are fully self-contained within a single file
- All services should include appropriate healthchecks
- Volume names should be descriptive and scoped to the service
Multi-service applications (e.g., authentik, openpanel, rybbit):
- Separate containers for frontend, backend, worker processes
- Shared database and cache services
- Each service depends on its prerequisites via
depends_on
Database configurations:
- PostgreSQL: Standard for most applications requiring relational data
- Redis: Used for caching and session management
- ClickHouse: Analytics and time-series data (openpanel, rybbit)
Security practices:
- Passwords generated with appropriate length (16-64 characters)
- Encryption keys use 32+ character passwords
- Database credentials isolated per service
- No hardcoded sensitive values
The repository includes templates for:
- authentik: Identity provider with PostgreSQL and Redis
- caddy: Reverse proxy server
- chronoframe: Application with Redis backend
- gitea: Git hosting platform with PostgreSQL
- grafana: Monitoring and visualization
- immich: Photo management with PostgreSQL, Redis, and ML service
- n8n: Workflow automation with PostgreSQL
- openpanel: Analytics platform with PostgreSQL, Redis, and ClickHouse
- penpot: Design platform
- pocketbase: Backend-as-a-Service
- postgres: Standalone PostgreSQL
- rustfs: Rust-based file system service
- rybbit: Analytics platform with PostgreSQL and ClickHouse
- typesense: Search engine
- valkey: Redis-compatible key-value store
- Create a new
.ymlfile in the root directory - Start with the
x-zane-envsection defining all required variables - Use templating syntax for secrets and domains
- Define all services with appropriate healthchecks
- Add ZaneOps routing labels to services that need HTTP access
- Define volumes for data persistence
- Test the template structure matches existing patterns
- Preserve the
x-zane-envstructure and variable names - Maintain healthcheck configurations when updating service versions
- Keep ZaneOps routing labels intact unless intentionally changing URLs
- Update version tags in both
x-zane-envand service definitions - Ensure
depends_onrelationships remain correct after changes
- Database variables:
DB_*,POSTGRES_*,CLICKHOUSE_*, etc. - Service URLs:
*_URL,*_HOST - Authentication:
*_SECRET,*_PASSWORD,*_KEY - Domain configuration:
*_domain,*_DOMAIN - Feature flags:
ALLOW_*,ENABLE_*,DISABLE_*
Services using ClickHouse (openpanel, rybbit) include inline configs to:
- Disable unnecessary logging to reduce disk usage
- Enable network access from other containers
- Configure JSON type support (where needed)
- Set appropriate log levels (warning/error only)
- PostgreSQL:
pg_isready -U ${USER} -d ${DB} - Redis:
redis-cli pingorredis-cli -a ${PASSWORD} ping - HTTP services:
curl -f http://localhost:PORT/healthor similar endpoint - ClickHouse:
clickhouse-client --query "SELECT 1"orwgetto/ping
- Internal container ports are defined in service environment variables
- External routing is handled through ZaneOps labels
- No ports are exposed to the host (ZaneOps manages ingress)