Skip to content
/ dokploy Public

A collection of dokploy application templates designed to be integrated with Cloudflare services

License

Notifications You must be signed in to change notification settings

enuno/dokploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

67 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dokploy Templates + Cloudflare Integration - AI Coding Agent System

Version: 1.0.0
Last Updated: December 24, 2025
Repository: https://github.com/enuno/dokploy
Project Lead: Ryno Crypto Mining Services - ServerDomes Network Engineering


πŸ“‹ Overview

This repository contains production-ready Dokploy application templates with integrated Cloudflare services (Workers, Pages, D1, R2, KV, Analytics Engine). The project is managed by a unified multi-agent AI coding system that ensures consistent quality, rapid iteration, and automated validation.

Key Features

  • βœ… Self-Contained Templates - Each template is a complete Docker Compose + template.toml package
  • βœ… Cloudflare Integration - Workers, Pages, D1, R2, KV support built-in
  • βœ… Production-Ready - Tested, validated, staged before PR submission
  • βœ… AI-Assisted - Claude designs, Cursor implements, Cline validates, Windsurf orchestrates
  • βœ… Automated Validation - >80% test coverage, staging deployment, health checks
  • βœ… Zero-Trust Standards - AGENTS.md as centralized source of truth for all agents

🎯 Quick Start

For Humans

  1. Clone the repository

    git clone https://github.com/enuno/dokploy.git
    cd dokploy
  2. Set up environment

    cp .env.example .env.local
    # Edit .env.local with your Cloudflare credentials
  3. Install dependencies (if using validation scripts)

    pnpm install
  4. View available templates

    cat meta.json
    npm run validate:all

For AI Agents (Skills-First Approach)

Claude Code uses a skills-first approach - instead of specialized agents, you use generic agents that load skills progressively:

  1. Create Dokploy Template (Skills-First Command)

    /dokploy-create [application-name]
    

    How it works:

    • Generic Builder agent executes the command
    • Skills loaded progressively (dokploy-compose-structure, dokploy-template-toml, etc.)
    • 35% fewer tokens than traditional multi-agent approach
    • Maintained context throughout the workflow

    See: .claude/commands/dokploy-create.md

  2. Required Skills (Project-Managed)

    .claude/skills/
    β”œβ”€β”€ dokploy-compose-structure/
    β”œβ”€β”€ dokploy-template-toml/
    β”œβ”€β”€ dokploy-traefik-routing/
    β”œβ”€β”€ dokploy-health-patterns/
    β”œβ”€β”€ dokploy-cloudflare-integration/
    β”œβ”€β”€ dokploy-environment-config/
    β”œβ”€β”€ dokploy-security-hardening/
    β”œβ”€β”€ dokploy-template-validation/
    └── dokploy-multi-service/
    

    Skills are:

    • Portable (work across projects)
    • Versioned independently
    • Loaded only when needed
    • Maintained separately

    See: AGENTS.md for skills documentation

  3. Legacy Multi-Agent Documentation (Reference Only)

    The following files document the previous multi-agent approach and are kept for reference:

    Current Recommendation: Use Claude Code with skills-first approach for 35% token efficiency vs multi-agent patterns


🐳 Custom Container Workflow

This repository supports building custom Docker images for your local registry that can be seamlessly integrated into Dokploy templates.

Workflow Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. Build Custom Container (/create-container)          β”‚
β”‚     β€’ Build from Dockerfiles/ directory                 β”‚
β”‚     β€’ Push to registry.hashgrid.net                     β”‚
β”‚     β€’ Update Dockerfiles/README.md index                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  2. Create Dokploy Template (/dokploy-create)           β”‚
β”‚     β€’ Reference custom image from registry              β”‚
β”‚     β€’ Use registry.hashgrid.net/app:tag in compose      β”‚
β”‚     β€’ Complete template with custom image               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  3. Deploy to Dokploy                                   β”‚
β”‚     β€’ Template uses your custom image                   β”‚
β”‚     β€’ Image pulled from local registry                  β”‚
β”‚     β€’ No external dependencies                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Building Custom Images

Create custom Dockerfiles in Dockerfiles/ directory:

Dockerfiles/
β”œβ”€β”€ README.md              # Auto-generated index of all images
β”œβ”€β”€ bitcoind/
β”‚   └── Dockerfile         # Bitcoin Core v30.0
β”œβ”€β”€ custom-nginx/
β”‚   └── Dockerfile         # Nginx with custom modules
└── my-app/
    └── Dockerfile         # Your custom application

Build and push to registry:

# Build Bitcoin Core image
/create-container Dockerfiles/bitcoind/Dockerfile bitcoind:30.0

# Build with auto-generated tag
/create-container Dockerfiles/my-app/Dockerfile

# Result:
# βœ… Image pushed to registry.hashgrid.net/bitcoind:30.0
# βœ… Dockerfiles/README.md updated with index entry

View available images:

cat Dockerfiles/README.md

Using Custom Images in Templates

Option 1: Reference during template creation

/dokploy-create my-bitcoin-stack

Claude Code will detect custom images in your registry and offer them during template generation.

Option 2: Manual reference in docker-compose.yml

services:
  bitcoind:
    image: registry.hashgrid.net/bitcoind:30.0  # Your custom image
    restart: always
    volumes:
      - bitcoin-data:/data
    networks:
      - app-net

Benefits of Custom Registry

  • βœ… Version Control - Track all custom image versions
  • βœ… No External Dependencies - Images stored locally
  • βœ… Faster Deployments - No pulling from external registries
  • βœ… Security Auditing - Build images from verified Dockerfiles
  • βœ… Consistency - Same images across all deployments
  • βœ… Custom Patches - Apply security patches immediately

Registry Index

The Dockerfiles/README.md maintains a complete index:

Application Dockerfile Path Latest Tag Registry URL Last Built
bitcoind bitcoind/Dockerfile 30.0 registry.hashgrid.net/bitcoind:30.0 2025-12-29 08:46 UTC

Auto-updated by /create-container command


πŸ“– Documentation Structure

For Everyone

  • README.md ← You are here (project overview)
  • AGENTS.md ⭐ START HERE (Universal standards & source of truth)
  • SKILLS.md πŸ†• Skills Ecosystem (v2.0+ skills-first architecture)

For Claude Code (v2.0+ Skills-First)

For Other AI Tools (Legacy, Reference Only)

For Project Coordination

For Configuration


🎭 The Five AI Agents

1. Claude - Architect & Designer

Role: Strategic planning, architecture design, complex problem-solving
When to Use: "Design a template for..."
Output: Architecture documents, design specifications, guidance
File: CLAUDE.md

# Example session start
"Hello! I'm working on Dokploy templates. 
Reference: AGENTS.md is my source of truth for all standards.
Design a Grafana + Prometheus monitoring stack template."

2. Cursor - Interactive Builder

Role: Hands-on code generation, local editing, fast iteration
When to Use: "@builder Implement..."
Output: Template files (docker-compose.yml, template.toml, etc.)
File: CURSOR.md

# In Cursor IDE
@builder Implement docker-compose.yml and template.toml based on architecture
@architect Review the template and suggest improvements
@cloudflare Add Cloudflare Workers integration

3. Cline - Local Validator & Executor

Role: Command execution, testing, validation, real-time feedback
When to Use: "Cline, validate templates and run tests"
Output: Test reports, validation results, staging URLs
File: CLINE.md

# From Claude/Cursor/Terminal
npm run validate:all          # Validate all templates
npm run test:coverage         # Full test suite with coverage
npm run deploy:staging        # Deploy to staging
npm run test:cloudflare       # Test CF API integration

4. Windsurf - Async Orchestrator

Role: Background workflows, continuous monitoring, multi-agent coordination
When to Use: "@windsurf-build Create template" (with async validation)
Output: Async notifications, task queue status, continuous monitoring
File: WINDSURF.md

# In Windsurf IDE
@windsurf-build Create complete Grafana template
# Windsurf runs validation in background
# Editor remains responsive
# Notified when ready

5. Copilot - Inline Assistant

Role: Quick code completions, inline suggestions, pattern helpers
When to Use: Automatic (as you type in Cursor)
Output: Code completions, suggestions, quick fixes
File: COPILOT.md

# In Cursor editor
# Type: [variables]
# Copilot suggests: main_domain = "${domain}"
# Press Tab to accept

πŸš€ Typical Workflow

From Idea to Deployed Template (30 minutes)

T+0:  USER REQUESTS
      "Create a Redis caching layer template with Cloudflare integration"
      ↓

T+5:  CLAUDE (Design Phase)
      Designs architecture
      Output: Architecture doc with variables, services, CF integration
      ↓

T+10: CURSOR (Implementation Phase)
      Opens editor
      @builder Implement template from architecture
      Copilot suggests patterns as needed
      Output: docker-compose.yml, template.toml, meta.json
      ↓

T+15: WINDSURF (Async Monitoring)
      Detects new files
      Automatically triggers validation pipeline
      (Non-blocking - editor continues responsive)
      ↓

T+20: CLINE (Validation - Background)
      npm run validate        β†’ checks syntax
      npm run test:coverage   β†’ runs tests
      npm run test:cloudflare β†’ tests CF APIs
      ↓

T+25: WINDSURF (Notification)
      "Validation complete βœ…"
      Staging URL provided
      ↓

T+30: DEPLOYMENT READY
      "Template ready for PR"
      Staging: https://dokploy-staging.../redis-xyz
      Coverage: 82%
      All checks: βœ… PASS

Total Time: 30 minutes with minimal manual intervention


πŸ“š File Finder: Find What You Need

Need File
Universal standards (start here!) AGENTS.md
Design a new template Use Claude + CLAUDE.md
Implement template Use Cursor + CURSOR.md
Validate & test locally Use Cline + CLINE.md
Async monitoring while working Use Windsurf + WINDSURF.md
Inline code suggestions Copilot auto-triggers + COPILOT.md
Multi-agent coordination docs/MULTIAGENTPLAN.md
Security policies docs/SECURITY.md
Staging environment docs/STAGING.md
Cloudflare APIs docs/API.md
Design patterns docs/DESIGNSYSTEM.md
Environment setup .env.example
Files to exclude from AI .aiignore

πŸ› οΈ Available Commands

Container Management

/create-container <dockerfile-path> [image-tag]
                                    # Build and push custom image to registry
                                    # Updates Dockerfiles/README.md index
                                    # See: .claude/commands/create-container.md

# Examples:
/create-container Dockerfiles/bitcoind/Dockerfile bitcoind:30.0
/create-container Dockerfiles/myapp/Dockerfile

Template Creation

/dokploy-create <app-name>          # Create production-ready Dokploy template
                                    # Skills-first progressive loading
                                    # Cloudflare-first integration
                                    # See: .claude/commands/dokploy-create.md

# Examples:
/dokploy-create nextcloud
/dokploy-create https://github.com/paperless-ngx/paperless-ngx

Validation & Testing

npm run validate:all              # Validate all templates
npm run validate -- blueprints/[name]  # Validate single template
npm run test:coverage             # Full test suite (>80% required)
npm run test -- tests/file.test.ts    # Single test file

Linting & Formatting

npm run lint:ts                   # TypeScript linting
npm run lint:toml                 # TOML syntax check
npm run lint:docker               # Docker Compose syntax
npm run format                    # Format all files (Prettier)
npm run type-check                # TypeScript type checking

Building & Deployment

npm run generate:meta             # Update meta.json
npm run build:template blueprints/[name]  # Build template base64
npm run deploy:staging --template=[name]  # Deploy to staging

Cloudflare Integration

npm run test:cloudflare           # Test CF API integration
CF_API_TOKEN=xxx npm run test:cloudflare  # With token

Documentation

npm run docs:generate blueprints/[name]   # Generate template docs
npm run docs:all                  # Generate all docs

πŸ”’ Security & Credentials

⚠️ NEVER Commit These

  • .env.local (local secrets, gitignored)
  • *.pem, *.key (SSH keys)
  • Database passwords in code
  • Cloudflare API tokens hardcoded
  • Any PII or sensitive data

βœ… DO Use Environment Variables

# In template.toml
[variables]
cf_api_token = "${CF_API_TOKEN}"  # User provides via .env.local
postgres_password = "${password:32}"  # Auto-generated by Dokploy

.env.local Setup

cp .env.example .env.local
# Edit with real credentials
# NEVER commit .env.local

πŸ§ͺ Quality Standards

All templates must meet:

  • βœ… Validation: 100% pass rate (npm run validate:all)
  • βœ… Test Coverage: >80% (npm run test:coverage)
  • βœ… Staging Deployment: Must succeed (npm run deploy:staging)
  • βœ… Cloudflare Integration: API tests pass (if applicable)
  • βœ… Documentation: Complete and clear
  • βœ… No Secrets: Hardcoded credentials forbidden

πŸ”„ Contributing

Add a New Template

  1. Design Phase (Claude)

    "Design a template for [service] with [features]"
    Output: Architecture document
    
  2. Implementation Phase (Cursor)

    "@builder Implement the template"
    Output: docker-compose.yml, template.toml
    
  3. Validation Phase (Cline)

    "Validate and test the template"
    Output: Test results + staging URL
    
  4. Submit PR

    git checkout -b template/[service-name]
    git add blueprints/[service-name]
    git commit -m "template: feat [service-name]: description"
    git push origin template/[service-name]
    

Include staging link in PR description!


πŸ“Š Project Structure

dokploy-templates-cloudflare/
β”œβ”€β”€ AGENTS.md                    # ⭐ Universal standards (read first!)
β”œβ”€β”€ README.md                    # This file
β”œβ”€β”€ CLAUDE.md, CURSOR.md, etc.   # Agent-specific configs
β”œβ”€β”€ .aiignore                    # Files excluded from AI
β”œβ”€β”€ .env.example                 # Environment template
β”œβ”€β”€ ai-agent.config.json         # Agent service config
β”‚
β”œβ”€β”€ Dockerfiles/                 # Custom container images
β”‚   β”œβ”€β”€ README.md                # Auto-generated registry index
β”‚   β”œβ”€β”€ bitcoind/
β”‚   β”‚   └── Dockerfile
β”‚   └── [custom-app]/
β”‚       └── Dockerfile
β”‚
β”œβ”€β”€ blueprints/                  # Template definitions
β”‚   β”œβ”€β”€ grafana/
β”‚   β”œβ”€β”€ pocketbase/
β”‚   └── [new-template]/
β”‚
β”œβ”€β”€ .claude/                     # Claude Code configuration
β”‚   β”œβ”€β”€ commands/
β”‚   β”‚   β”œβ”€β”€ create-container.md  # Container build workflow
β”‚   β”‚   └── dokploy-create.md    # Template creation workflow
β”‚   └── skills/                  # Skills-first architecture
β”‚       β”œβ”€β”€ dokploy-compose-structure/
β”‚       β”œβ”€β”€ dokploy-cloudflare-integration/
β”‚       └── [other-skills]/
β”‚
β”œβ”€β”€ tests/                       # Test suite
β”‚   β”œβ”€β”€ template-validation.test.ts
β”‚   β”œβ”€β”€ env-variables.test.ts
β”‚   └── cloudflare-api.test.ts
β”‚
β”œβ”€β”€ docs/                        # Extended documentation
β”‚   β”œβ”€β”€ MULTIAGENTPLAN.md
β”‚   β”œβ”€β”€ STAGING.md
β”‚   β”œβ”€β”€ API.md
β”‚   β”œβ”€β”€ SECURITY.md
β”‚   └── DESIGNSYSTEM.md
β”‚
β”œβ”€β”€ .cursor/                     # Cursor IDE config
β”‚   β”œβ”€β”€ settings.json
β”‚   └── rules/
β”‚
β”œβ”€β”€ .windsurf/                   # Windsurf config
β”‚   └── rules/
β”‚
β”œβ”€β”€ .github/
β”‚   └── copilot-instructions.md
β”‚
└── meta.json                    # Template registry

🀝 Multi-Agent Collaboration Example

SCENARIO: Add Cloudflare D1 to Pocketbase template

Step 1 - CLAUDE:
User: "How should we integrate Cloudflare D1 with Pocketbase?"
Claude: "Here's the architecture..."

Step 2 - CURSOR:
User: "@cloudflare Add D1 integration"
Cursor: Updates template.toml, creates cloudflare-d1-migration.js

Step 3 - WINDSURF (Async):
Windsurf: Detects file changes, triggers validation

Step 4 - CLINE (Background):
Cline: Runs npm run validate, npm run test:cloudflare

Step 5 - WINDSURF (Notification):
Windsurf: "Validation complete βœ…"

Result: Complete integration in <10 minutes!

πŸ“ž Support & Resources


πŸ“ Version History

Version Date Changes
1.0.0 Dec 24, 2025 Initial release with multi-agent system

πŸ“‹ Checklist: Getting Started

  • Read AGENTS.md (source of truth)
  • Set up .env.local from .env.example
  • Run pnpm install
  • Run npm run validate:all (verify setup)
  • Choose an AI agent for your task:
    • Design? β†’ Use Claude
    • Implement? β†’ Use Cursor
    • Test? β†’ Use Cline
    • Monitor? β†’ Use Windsurf
    • Quick fix? β†’ Use Copilot

πŸš€ Ready to create production-ready Dokploy templates with AI assistance?

Start with: AGENTS.md


Maintained By: Ryno Crypto Mining Services - ServerDomes Network Engineering
Last Updated: December 24, 2025
License: MIT (per original Dokploy)

About

A collection of dokploy application templates designed to be integrated with Cloudflare services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •