Drone server configuration¶
Drone is a Container-Native Continuous Integration platform that orchestrates build pipelines using containers^[drone.md]. A critical aspect of deploying Drone is compiling the server binary to remove strict build limitations found in the default distribution^[drone.md].
Compilation¶
By default, the open-source version of Drone is limited to 5,000 builds^[drone.md]. To remove this restriction, the server binary must be compiled manually from source using specific build tags^[drone.md].
Using the Go compiler, the nolimit tag is required to bypass these restrictions^[drone.md]. The command structure differs slightly depending on whether you are building the open-source or enterprise edition^[drone.md]:
- Open-source build:
go build -tags "oss nolimit" github.com/drone/drone/cmd/drone-server^[drone.md] - Enterprise build:
go build -tags "nolimit" github.com/drone/drone/cmd/drone-server^[drone.md]
Containerized Deployment¶
The Drone server can be deployed within a containerized environment (e.g., [[Docker]]). A multi-stage Dockerfile is often used to compile the binary and then run it in a lightweight image^[drone.md].
Build Stage¶
The build process typically uses a Golang base image (e.g., golang:1.18-alpine) to compile the source code^[drone.md]. This stage involves setting the DRONE_VERSION environment variable and executing the build with the nolimit tag^[drone.md].
Configuration Environment Variables¶
The final runtime image (usually based on alpine) requires several environment variables to configure the server's behavior^[drone.md]. Key configuration parameters include:
- Database:
DRONE_DATABASE_DRIVER(e.g.,sqlite3) andDRONE_DATABASE_DATASOURCE(e.g.,/data/database.sqlite)^[drone.md]. - Networking:
DRONE_SERVER_HOSTandDRONE_SERVER_PORT(default:80)^[drone.md]. - Runner Configuration:
DRONE_RUNNER_OSandDRONE_RUNNER_ARCH(e.g.,linux,amd64)^[drone.md]. - Telemetry:
DRONE_DATADOG_ENABLEDandDRONE_DATADOG_ENDPOINT^[drone.md].
The server exposes ports 80 and 443 and typically mounts a volume to /data for persistent storage^[drone.md].
Sources¶
^[drone.md]