Version 0.9.0
Language EN

Gitea

The goal of this document is to give you enough technical specifics to configure and run the Drone server in single-machine mode. The Drone server will use an embedded sqlite database and will execute pipelines on the same machine as the server.

Download

The Drone server is distributed as a lightweight Docker image. The image is self-contained and does not have any external dependencies.

docker pull drone/drone:0.9.0-alpha.2

Start the Server

The server container can be started with the below command. The container is configured through environment variables. For a full list of configuration parameters, please see the configuration reference.

docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/var/lib/drone:/data \
  --env=DRONE_TLS_AUTOCERT=true \
  --env=DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} \
  --env=DRONE_SERVER_HOST=${DRONE_SERVER_HOST} \
  --env=DRONE_SERVER_PROTO=https \
  --env=DRONE_RUNNER_CAPACITY=2 \
  --env=DRONE_PRIVATE_MODE=false \
  --env=DRONE_LOGS_DEBUG=true \
  --publish=80:80 \
  --publish=443:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:0.9.0-alpha.2

Reference

Environment

Configuration parameters are set using environment variables. This section defines a subset of recommended configuration paramters. For a full list, please see our configuration reference.

DRONE_GITEA_SERVER

A string contianer your Gitea server address.

DRONE_GITEA_SERVER=https://gitea.domain.com

DRONE_RUNNER_CAPACITY

An integer defining the maximum number of pipelines the server should execute concurrently. The default value is two pipelines.

DRONE_RUNNER_CAPACITY=2

DRONE_SERVER_PROTO

A string containing your Drone server protocol scheme. This value should be set to http or https. This field defaults to https if you configure ssl or acme.

DRONE_SERVER_PROTO=https

DRONE_SERVER_HOST

A string containing your Drone server hostname or IP address.

DRONE_SERVER_HOST=drone.domain.com

DRONE_PRIVATE_MODE

An boolean indicating authentication is required when cloning public repositories. The default value is false.

DRONE_PRIVATE_MODE=true

DRONE_TLS_AUTOCERT

An boolean indicating debug level logs should be use for automatic SSL certification generation and configuration. The default value is false.

DRONE_TLS_AUTOCERT=true

DRONE_LOGS_DEBUG

An boolean indicating DEBUG level logs should be written to stderr. The default log level is INFO and the default value is false.

DRONE_LOGS_DEBUG=true

Network

The server listens on standard http and https ports inside the container, which should be published on the host machine:

--publish=80:80
--publish=443:443

Volumes

The server requires access to your host machine Docker socket. This is used to launch pipelines in Docker containers on the host machine. This is required if you are running Drone in single-machine mode.

--volume=/var/run/docker.sock:/var/run/docker.sock

The server creates a sqlite database and persists to a contianer volume at /data. To prevent dataloss, we recommend mounting the data volume to the host machine when using the default sqlite database.

--volume=/var/lib/drone:/data

On This Page:

Getting Help

Enterprise Support
Real-time chat support from the developers that wrote the code.
Mailing List
Search for information in the mailing list archives, or post a question.