xiaohongshu
xiaohongshu
dokploy-environment-config
Environment variable patterns for Dokploy templates including required vs optional syntax, secrets, connection strings, and configuration organization.
Full skill instructions
:? syntax)Variables that MUST be set - deployment fails without them:
environment:
DOMAIN: ${DOMAIN:?Set your domain (e.g., example.com)}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:?Set a secure database password}
SECRET_KEY: ${SECRET_KEY:?Set a secret key for session encryption}
Syntax: ${VAR_NAME:?Error message}
:- syntax)Variables with sensible defaults:
environment:
LOG_LEVEL: ${LOG_LEVEL:-info}
WORKERS: ${WORKERS:-4}
CACHE_TTL: ${CACHE_TTL:-3600}
DEBUG: ${DEBUG:-false}
Syntax: ${VAR_NAME:-default_value}
Values that shouldn't change:
environment:
# Database host is always the service name
PGHOST: postgres
REDIS_HOST: redis
# Ports are fixed in the container
PGPORT: "5432"
REDIS_PORT: "6379"
Variables derived from other variables:
environment:
APP_URL: https://${DOMAIN}
DATABASE_URL: postgresql://${DB_USER}:${DB_PASS}@postgres:5432/${DB_NAME}
MONGO_URL: mongodb://mongodb:27017/${MONGO_DB:-appdb}
environment:
# Primary domain (required)
DOMAIN: ${DOMAIN:?Set your domain}
# Derived URLs
APP_URL: https://${DOMAIN}
PUBLIC_URL: https://${DOMAIN}
CORS_ORIGIN: https://${DOMAIN}
ALLOWED_HOSTS: ${DOMAIN}
PostgreSQL:
environment:
POSTGRES_DB: ${POSTGRES_DB:-appdb}
POSTGRES_USER: ${POSTGRES_USER:-appuser}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set database password}
# For app service connecting to postgres
DATABASE_URL: postgresql://${POSTGRES_USER:-appuser}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-appdb}
# OR individual variables
DB_HOST: postgres
DB_PORT: "5432"
DB_NAME: ${POSTGRES_DB:-appdb}
DB_USER: ${POSTGRES_USER:-appuser}
DB_PASS: ${POSTGRES_PASSWORD}
MongoDB:
environment:
MONGO_INITDB_DATABASE: ${MONGO_DB:-appdb}
# For app service
MONGO_URL: mongodb://mongodb:27017/${MONGO_DB:-appdb}
MONGO_DB: ${MONGO_DB:-appdb}
Redis:
environment:
# For app service
REDIS_URL: redis://redis:6379
REDIS_HOST: redis
REDIS_PORT: "6379"
environment:
# Session/cookie security
SECRET_KEY: ${SECRET_KEY:?Set a secret key}
COOKIE_SECRET: ${COOKIE_SECRET:?Set cookie secret}
# JWT/Auth
JWT_SECRET: ${JWT_SECRET:?Set JWT secret}
# API keys (user-provided)
API_KEY: ${API_KEY:?Set API key}
environment:
# S3-compatible storage (Cloudflare R2)
S3_ENDPOINT: ${S3_ENDPOINT:?Set Cloudflare R2 endpoint}
S3_REGION: ${S3_REGION:-auto}
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:?Set R2 access key ID}
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY:?Set R2 secret access key}
S3_BUCKET: ${S3_BUCKET:?Set R2 bucket name}
S3_FORCE_PATH_STYLE: "false"
environment:
# Feature flags
DEBUG: ${DEBUG:-false}
ENABLE_FEATURE_X: ${ENABLE_FEATURE_X:-true}
# Performance tuning
WORKERS: ${WORKERS:-4}
MAX_CONNECTIONS: ${MAX_CONNECTIONS:-100}
CACHE_TTL: ${CACHE_TTL:-3600}
# Logging
LOG_LEVEL: ${LOG_LEVEL:-info}
LOG_FORMAT: ${LOG_FORMAT:-json}
environment:
ADMIN_USER: ${ADMIN_USER:-admin}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?Set admin password}
ADMIN_EMAIL: ${ADMIN_EMAIL:?Set admin email}
services:
paaster:
environment:
# ===========================================
# Domain Configuration
# ===========================================
PAASTER_DOMAIN: ${PAASTER_DOMAIN:?Set your domain}
# ===========================================
# Session Security
# ===========================================
COOKIE_SECRET: ${COOKIE_SECRET:?Set a secure random cookie secret}
# ===========================================
# MongoDB Connection
# ===========================================
MONGO_DB: ${MONGO_DB:-paasterv3}
MONGO_URL: mongodb://mongodb:27017/${MONGO_DB:-paasterv3}
# ===========================================
# S3 Storage (Cloudflare R2)
# Get from: Cloudflare Dashboard > R2 > Manage R2 API Tokens
# Endpoint format: https://<ACCOUNT_ID>.r2.cloudflarestorage.com
# ===========================================
S3_ENDPOINT: ${S3_ENDPOINT:?Set Cloudflare R2 endpoint}
S3_REGION: ${S3_REGION:-auto}
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:?Set R2 access key ID}
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY:?Set R2 secret access key}
S3_BUCKET: ${S3_BUCKET:?Set R2 bucket name}
S3_FORCE_PATH_STYLE: "false"
mongodb:
environment:
MONGO_INITDB_DATABASE: ${MONGO_DB:-paasterv3}
services:
paperless:
environment:
# ===========================================
# Application Settings
# ===========================================
PAPERLESS_SECRET_KEY: ${PAPERLESS_SECRET_KEY:?Set secret key}
PAPERLESS_URL: https://${PAPERLESS_DOMAIN}
PAPERLESS_ALLOWED_HOSTS: ${PAPERLESS_DOMAIN}
PAPERLESS_CORS_ALLOWED_HOSTS: https://${PAPERLESS_DOMAIN}
# ===========================================
# Database (PostgreSQL)
# ===========================================
PAPERLESS_DBHOST: postgres
PAPERLESS_DBPORT: "5432"
PAPERLESS_DBNAME: ${POSTGRES_DB:-paperless}
PAPERLESS_DBUSER: ${POSTGRES_USER:-paperless}
PAPERLESS_DBPASS: ${POSTGRES_PASSWORD:?Set database password}
# ===========================================
# Cache (Redis)
# ===========================================
PAPERLESS_REDIS: redis://redis:6379
# ===========================================
# Document Processing
# ===========================================
PAPERLESS_OCR_LANGUAGE: ${OCR_LANGUAGE:-eng}
PAPERLESS_TIKA_ENABLED: "1"
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
# ===========================================
# Admin User (created on first run)
# ===========================================
PAPERLESS_ADMIN_USER: ${ADMIN_USER:-admin}
PAPERLESS_ADMIN_PASSWORD: ${ADMIN_PASSWORD:?Set admin password}
PAPERLESS_ADMIN_MAIL: ${ADMIN_EMAIL:?Set admin email}
postgres:
environment:
POSTGRES_DB: ${POSTGRES_DB:-paperless}
POSTGRES_USER: ${POSTGRES_USER:-paperless}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set database password}
services:
forgejo:
environment:
# ===========================================
# Server Configuration
# ===========================================
FORGEJO__server__DOMAIN: ${FORGEJO_DOMAIN}
FORGEJO__server__ROOT_URL: https://${FORGEJO_DOMAIN}/
FORGEJO__server__SSH_DOMAIN: ${FORGEJO_DOMAIN}
FORGEJO__server__SSH_PORT: ${SSH_PORT:-2222}
# ===========================================
# Database (PostgreSQL)
# ===========================================
FORGEJO__database__DB_TYPE: postgres
FORGEJO__database__HOST: postgres:5432
FORGEJO__database__NAME: ${POSTGRES_DB:-forgejo}
FORGEJO__database__USER: ${POSTGRES_USER:-forgejo}
FORGEJO__database__PASSWD: ${POSTGRES_PASSWORD:?Set database password}
# ===========================================
# Security
# ===========================================
FORGEJO__security__SECRET_KEY: ${SECRET_KEY:?Set secret key}
FORGEJO__security__INTERNAL_TOKEN: ${INTERNAL_TOKEN:?Set internal token}
FORGEJO__oauth2__JWT_SECRET: ${JWT_SECRET:?Set JWT secret}
# ===========================================
# Service Settings
# ===========================================
FORGEJO__service__DISABLE_REGISTRATION: ${DISABLE_REGISTRATION:-false}
FORGEJO__service__REQUIRE_SIGNIN_VIEW: ${REQUIRE_SIGNIN:-false}
postgres:
environment:
POSTGRES_DB: ${POSTGRES_DB:-forgejo}
POSTGRES_USER: ${POSTGRES_USER:-forgejo}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set database password}
:?):-):? with clear error message:- with sensible defaultIssue: ${VAR:?} gives unclear error
Solution: Always add descriptive message: ${VAR:?Set your domain}
Issue: Service IPs change on restart
Solution: Use service names: postgres, redis, mongodb
Issue: Secrets visible in repository
Solution: Use variables: ${PASSWORD:?Set password}
Issue: YAML interprets as number
Solution: Quote port strings: DB_PORT: "5432"
This skill is part of the skills-first architecture - loaded during Generation phase to configure environment variables before creating template.toml.
dokploy-template-toml: Variable generation in template.tomldokploy-security-hardening: Secret managementdokploy-cloudflare-integration: R2 credentials/dokploy-create command: Phase 3 (Generation) - Step 5dokploy-compose-structure: Create base structuredokploy-traefik-routing: Add routing labelsdokploy-health-patterns: Add health checksdokploy-cloudflare-integration: Add CF integration (if applicable)dokploy-template-toml: Create template.tomlSee: .claude/commands/dokploy-create.md for full workflow
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience