Usage & Enterprise Capabilities
Key Benefits
- Pipeline Simplicity: Define your entire CI/CD process in a single, version-controlled YAML file.
- Isolated Builds: Containers ensure that every build starts with a clean environment.
- Extreme Speed: Optimized for rapid execution and low resource consumption.
- Plugin Ecosystem: Easily add support for deployments, notifications, and security scans.
- Native Integration: Works out of the box with all major git providers.
Production Architecture Overview
- Drone Server: The central management service and web interface.
- Drone Runners: Distributed processes that execute the actual pipeline steps (Docker, Kubernetes, or SSH).
- Relational Database: PostgreSQL or MySQL for metadata and build history.
- SCM Integration: Connection to your Git provider (GitHub, GitLab, Gitea).
- Reverse Proxy: NGINX or Caddy to handle SSL/TLS and routing.
Implementation Blueprint
Implementation Blueprint
Prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start dockerDocker Compose Production Setup
version: '3'
services:
drone-server:
image: drone/drone:latest
ports:
- "80:80"
- "443:443"
environment:
- DRONE_GITHUB_CLIENT_ID=${GITHUB_ID}
- DRONE_GITHUB_CLIENT_SECRET=${GITHUB_SECRET}
- DRONE_RPC_SECRET=${RPC_SECRET}
- DRONE_SERVER_HOST=${DOMAIN}
- DRONE_SERVER_PROTO=https
- DRONE_DATABASE_DRIVER=postgres
- DRONE_DATABASE_DATASOURCE=postgres://user:pass@db:5432/drone?sslmode=disable
depends_on:
- db
volumes:
- drone_data:/data
restart: always
drone-runner:
image: drone/drone-runner-docker:latest
environment:
- DRONE_RPC_HOST=${DOMAIN}
- DRONE_RPC_PROTO=https
- DRONE_RPC_SECRET=${RPC_SECRET}
- DRONE_RUNNER_CAPACITY=2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
db:
image: postgres:14-alpine
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=drone
volumes:
- pg_data:/var/lib/postgresql/data
restart: always
volumes:
drone_data:
pg_data:Kubernetes Production Deployment (Recommended)
helm repo add drone https://charts.drone.io
helm install drone drone/drone --namespace devops --create-namespace- Scalable Runners: Use the Kubernetes runner to spin up isolated pods for every build step, scaling your CI capacity to infinity.
- Secure Secret Management: Use Kubernetes Secrets to manage your SCM credentials and RPC tokens.
- Zero-Downtime Reliability: Rolling updates for the server and runners without interrupting active builds.
Scaling Strategy
- Distributed Runners: Scale your CI throughput by adding more Drone runners on different hosts or in the cluster.
- Database Optimization: Use a managed PostgreSQL instance for your server to ensure build metadata is durable and fast.
- Caching: Use the Drone S3 or volume caching plugins to speed up builds by persisting dependencies across runs.
- Architecture Tuning: Deploy specific runners for AMD64, ARM64, or Windows workloads based on your project needs.
Backup & Safety
- Database Snapshots: Automate daily PostgreSQL backups and store them offsite securely.
- RPC Secret Management: Rotate your RPC secrets regularly and ensure they are never committed to your repositories.
- Volume Backups: Regularly backup the persistent volumes containing your server logs and runner configurations.
- HTTPS Enforcement: Always run Drone behind a secure reverse proxy with SSL/TLS enabled to protect your SCM integration.
Recommended Hosting for Drone
For systems like Drone, we recommend high-performance VPS hosting. Hostinger offers dedicated setups for open-source tools with one-click installer scripts and 24/7 priority support.
Get Started on HostingerExplore Alternative Tools Infrastructure
Kubernetes
Kubernetes is a production-grade, open-source platform for automating deployment, scaling, and operations of application containers.
Supabase
Supabase is the leading open-source alternative to Firebase. It provides a full backend-as-a-service (BaaS) powered by PostgreSQL, including authentication, real-time subscriptions, and storage.