Skip to content

NaNomicon/dokploy-devpod-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dokploy DevPod Provider

Dokploy Logo

A DevPod provider for Dokploy that creates development workspaces using Docker Compose services.

Version Release

Go DevPod Dokploy License

Installation β€’ Contributing

Open in DevPod!


πŸŽ‰ Current Status

Core functionality is working and tested.

✨ What This Does

Creates development workspaces on your Dokploy server that you can connect to with DevPod. Think of it as your personal cloud development environment that automatically sets up everything you need.

How It Works

DevPod β†’ Dokploy Provider β†’ Docker Compose Service β†’ SSH Access β†’ Your Code
  1. Creates infrastructure: Spins up Docker Compose services in Dokploy
  2. Sets up SSH: Configures secure root access to containers
  3. Installs DevPod agent: DevPod connects and sets up your dev environment
  4. Ready to code: Open in VS Code, clone repos, install dependencies automatically

🎯 Features

  • βœ… Docker Compose services - Uses Dokploy's stable service infrastructure
  • βœ… SSH setup - Automatic port mapping and authentication
  • βœ… DevPod integration - Full workspace lifecycle support
  • βœ… Docker-in-Docker - Complete container development capabilities
  • βœ… Git repositories - Clone and develop any repository
  • βœ… Go binary helper - Fast operations instead of slow shell scripts

πŸ“‹ Requirements

  • DevPod installed locally
  • Dokploy server with API access
  • API token with project creation permissions

πŸ”„ Compatibility

Component Supported Version Status
DevPod v0.6.15 βœ… Tested & Supported
Dokploy v0.22.7 βœ… Tested & Supported

⚠️ Note: We currently do not offer backward compatibility. Always use the exact versions listed above for the best experience. Newer versions may work but are not guaranteed to be compatible until tested and updated here.

πŸš€ Installation

Quick Start

# Clone and build
git clone https://github.com/your-org/dokploy-devpod-provider
cd dokploy-devpod-provider
make build
make install-dev

Configure Provider

devpod provider set-options dokploy-dev \
  DOKPLOY_SERVER_URL=https://your-dokploy-server.com \
  DOKPLOY_API_TOKEN=your-api-token

Create Your First Workspace

# From a Git repository
devpod up https://github.com/microsoft/vscode-remote-try-node --provider dokploy-dev

# From a Docker image
devpod up ubuntu --provider dokploy-dev

βš™οΈ Configuration

Option Description Default Required
DOKPLOY_SERVER_URL Your Dokploy server URL - βœ…
DOKPLOY_API_TOKEN API token for authentication - βœ…
DOKPLOY_PROJECT_NAME Project name for workspaces devpod-workspaces ❌

Note: DevPod automatically manages agent installation, credentials injection, and auto-shutdown features.

πŸ”§ Development

# Build binary
make build

# Install as development provider
make install-dev

# Test different scenarios
make test-git      # Test Git repository
make test-docker   # Test Docker image
make test-lifecycle # Full create/delete cycle

# Clean up stuck workspaces
make force-uninstall

πŸ› οΈ Architecture

Container Setup Process

The provider creates workspaces with a 4-stage setup (~2-4 minutes):

  1. Docker daemon startup (~30-60 seconds)
  2. Install SSH server + tools (~30-60 seconds)
  3. Configure SSH for root user (~10-20 seconds)
  4. Finalize SSH daemon (~10-20 seconds)

Technical Details

  • Base Image: cruizba/ubuntu-dind:latest (Docker-in-Docker)
  • SSH Authentication: Root access with key injection
  • Port Range: 2222-2250 for SSH mappings
  • API Integration: Dokploy REST API for service management

πŸ› Troubleshooting

SSH connection issues
  • Wait 2-4 minutes for full container setup
  • Check if ports 2222-2250 are available
  • Verify API token has correct permissions
DevPod provider issues
  • Try devpod provider delete dokploy-dev && make install-dev to reinstall
  • Check logs with devpod up --debug
Container startup problems
  • Check Dokploy dashboard for service status
  • Look at Docker Compose service logs in Dokploy
  • Ensure Docker Swarm ports have propagated (can take 60+ seconds)

⚠️ Current Limitations

  • Only tested on a few setups - might break in other environments
  • SSH setup is slow (2-4 minutes)
  • Port range is hardcoded (2222-2250)
  • Error handling could be better
  • No resource limits on containers
  • Limited debugging tools

🀝 Contributing

This is a prototype that needs work! Help is welcome:

  • πŸ§ͺ Test on different environments - Try it on your setup
  • πŸ“ Improve error messages - Make failures clearer
  • πŸ› Fix edge cases and bugs - There are definitely some
  • πŸ“š Write better documentation - Always room for improvement

See CONTRIBUTING.md for development details.

πŸ“ License

MIT License - feel free to use this however you want.

πŸ™ Acknowledgments


Built with ❀️ for developers who want better development environments

About

A DevPod provider using Dokploy which creates development workspaces using Docker Compose services.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks