2015-07-10 00:01:03 +00:00
# Drone
Drone is a Continuous Integration platform built on container technology. Every build is executed inside an ephemeral Docker container, giving developers complete control over their build environment with guaranteed isolation.
## Documentation
Drone documentation is organized into several categories:
* [Setup Guide ](http://readme.drone.io/docs/setup/ )
* [Build Guide ](http://readme.drone.io/docs/build/ )
* [API Reference ](http://readme.drone.io/docs/api/ )
## Community
Contributions, questions, and comments are all welcomed and encouraged! Drone developers hang out in the [drone/drone ](https://gitter.im/drone/drone ) room on [gitter ](https://gitter.im/drone/drone ).
---
2014-11-10 08:24:47 +00:00
2015-04-08 23:59:57 +00:00
Running Drone:
2014-11-10 08:24:47 +00:00
2014-08-02 18:21:39 +00:00
```
2015-04-08 23:59:57 +00:00
./drone --config="/path/to/config.toml"
2014-09-03 07:23:36 +00:00
```
2014-08-02 18:21:39 +00:00
2015-04-08 23:59:57 +00:00
Configuring Drone:
2015-02-19 18:20:14 +00:00
2014-09-03 07:23:36 +00:00
```toml
2014-10-11 21:30:51 +00:00
[server]
2015-04-16 22:15:05 +00:00
addr = ":80"
cert = ""
key = ""
2014-10-11 21:30:51 +00:00
2014-10-12 03:33:06 +00:00
[session]
2015-04-16 22:15:05 +00:00
secret = ""
expires = ""
2014-10-12 03:33:06 +00:00
2014-10-01 19:01:02 +00:00
[database]
2015-06-11 12:52:24 +00:00
driver="sqlite3"
datasource="/var/lib/drone/drone.sqlite"
2014-09-07 21:55:37 +00:00
2014-12-10 14:57:39 +00:00
[docker]
2015-04-16 22:15:05 +00:00
cert = ""
key = ""
2015-05-28 17:04:50 +00:00
addr = "unix:///var/run/docker.sock"
swarm = ""
2014-09-07 21:55:37 +00:00
2015-06-05 23:57:30 +00:00
[remote]
2015-05-28 17:04:50 +00:00
kind = "github"
2015-04-08 23:59:57 +00:00
base = "https://github.com"
orgs = []
open = false
2015-05-28 17:04:50 +00:00
private = false
2015-04-08 23:59:57 +00:00
skip_verify = true
2015-05-28 17:04:50 +00:00
[auth]
2015-04-08 23:59:57 +00:00
client = ""
secret = ""
authorize = "https://github.com/login/oauth/authorize"
access_token = "https://github.com/login/oauth/access_token"
request_token = ""
2015-05-19 04:54:10 +00:00
[agents]
secret = ""
2014-09-03 07:23:36 +00:00
```
2015-05-28 17:04:50 +00:00
2015-06-05 23:57:30 +00:00
Configuration settings can also be set by environment variables using the scheme
`DRONE_<section>_<confkey>` , substituting the section title for `<section>` and
the key for `<confkey>` , in all caps. For example:
2015-05-28 17:04:50 +00:00
```shell
#!/bin/bash
# prepare environment for executing drone
2015-06-05 23:57:30 +00:00
DRONE_REMOTE_BASE="https://github.com" # for [remote] section, 'base' setting
2015-05-28 17:04:50 +00:00
DRONE_DOCKER_ADDR="tcp://10.0.0.1:2375" # for [docker] section, 'addr' setting
DRONE_AUTH_CLIENT="0123456789abcdef0123AA" # for [auth] section, 'client' setting
DRONE_AUTH_SECRET="< sha-1 hash secret > " # for [auth] section, 'secret' setting
2015-06-05 23:57:30 +00:00
DRONE_AUTH_ACCESSTOKEN="< url > " # for [auth] section, 'access_token' setting
2015-05-28 17:04:50 +00:00
2015-05-30 05:04:41 +00:00
exec ./drone -config=drone.toml
2015-05-28 17:04:50 +00:00
```
2015-06-05 23:57:30 +00:00
_NOTE: Configuration settings from environment variables override values set in
the TOML file._
2015-05-31 20:36:51 +00:00
### From Source
Commands to build from source:
```sh
make bindata # create .go files for web assets
make # create binary files in ./bin
make test # execute unit tests
```
Commands to run:
```sh
bin/drone
bin/drone --debug # debug mode loads static content from filesystem
```
2015-06-05 23:57:30 +00:00
**NOTE** if you are seeing slow compile times you can try running `go install`
for the vendored `go-sqlite3` library:
2015-05-31 20:36:51 +00:00
```sh
go install github.com/drone/drone/Godeps/_workspace/src/github.com/mattn/go-sqlite3
2015-06-05 23:57:30 +00:00
```