1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/README.md

189 lines
4.1 KiB
Markdown
Raw Normal View History

2014-10-12 02:56:03 +03:00
[![Build Status](http://test.drone.io/v1/badge/github.com/drone/drone/status.svg)](http://test.drone.io/github.com/drone/drone)
[![GoDoc](https://godoc.org/github.com/drone/drone?status.png)](https://godoc.org/github.com/drone/drone)
2014-10-12 03:50:52 +03:00
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/drone/drone?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## System Requirements
2014-02-14 01:43:02 +03:00
* Docker
* AUFS
We highly recommend running Docker with the AUFS storage driver. You can verify Docker is using
the AUFS storage driver with the following command `sudo docker info | grep Driver:`
## Installation
2014-10-12 02:56:03 +03:00
**This is project is alpha stage. Consider yourself warned**
We have optimized the installation process for Ubuntu since that is what we test with internally.
You can run the following commands to quickly download an install Drone on an Ubuntu machine.
```sh
2014-10-12 19:22:51 +03:00
# Ubuntu, Debian
2014-10-12 02:56:03 +03:00
wget downloads.drone.io/master/drone.deb
sudo dpkg -i drone.deb
2014-10-12 19:22:51 +03:00
# CentOS, RedHat
wget downloads.drone.io/master/drone.rpm
sudo yum localinstall drone.rpm
```
2014-10-01 21:58:27 +03:00
## Database
By default, Drone will create a SQLite database. Drone also supports Postgres and MySQL
databases. You can customize the database settings using the configuration options
described in the **Setup** section.
Below are some example configurations that you can use as reference:
2014-10-12 03:50:52 +03:00
```toml
2014-10-01 21:58:27 +03:00
# to use postgres
[database]
2014-10-01 21:58:27 +03:00
driver="postgres"
2014-10-12 02:56:03 +03:00
datasource="host=127.0.0.1 user=postgres dbname=drone sslmode=disable"
2014-10-01 21:58:27 +03:00
# to use mysql
[database]
2014-10-01 21:58:27 +03:00
driver="mysql"
2014-10-12 02:56:03 +03:00
datasource="root@tcp(127.0.0.1:3306)/drone"
2014-10-01 21:58:27 +03:00
```
## Setup
We are in the process of moving configuration out of the UI and into configuration
files and/or environment variables (your choice which). If you prefer configuration files
you can provide Drone with the path to your configuration file:
```sh
2014-10-12 02:56:03 +03:00
droned --config=/path/to/drone.toml
```
2014-10-12 02:56:03 +03:00
The configuration file is in TOML format. If installed using the `drone.deb` file
will be located in `/etc/drone/drone.toml`.
```toml
2014-10-12 00:30:51 +03:00
[server]
port=""
[server.ssl]
key=""
cert=""
[session]
secret=""
duration=""
[database]
2014-10-01 21:58:27 +03:00
driver=""
datasource=""
2014-10-01 21:58:27 +03:00
[registration]
open=true
[github]
client=""
secret=""
[github_enterprise]
client=""
secret=""
api=""
url=""
private_mode=false
[bitbucket]
client=""
secret=""
2014-09-04 06:48:13 +03:00
[gitlab]
url=""
[smtp]
host=""
port=""
from=""
user=""
pass=""
[worker]
nodes=[
"unix:///var/run/docker.sock",
"unix:///var/run/docker.sock"
]
```
Or you can use environment variables
2014-02-07 13:10:01 +03:00
```sh
2014-10-14 05:33:42 +03:00
# custom http server settings
2014-10-12 00:30:51 +03:00
export DRONE_SERVER_PORT=""
export DRONE_SERVER_SSL_KEY=""
export DRONE_SERVER_SSL_CERT=""
2014-10-01 21:58:27 +03:00
# custom database settings
export DRONE_DATABASE_DRIVER=""
export DRONE_DATABASE_DATASOURCE=""
2014-10-01 21:58:27 +03:00
# enable users to self-register
export DRONE_REGISTRATION_OPEN=false
# github configuration
export DRONE_GITHUB_CLIENT=""
2014-09-04 06:48:13 +03:00
export DRONE_GITHUB_SECRET=""
# github enterprise configuration
export DRONE_GITHUB_ENTERPRISE_CLIENT=""
export DRONE_GITHUB_ENTERPRISE_SECRET=""
export DRONE_GITHUB_ENTERPRISE_API=""
export DRONE_GITHUB_ENTERPRISE_URL=""
export DRONE_GITHUB_ENTERPRISE_PRIVATE_MODE=false
# bitbucket configuration
export DRONE_BITBUCKET_CLIENT=""
export DRONE_BITBUCKET_SECRET=""
2014-09-04 06:48:13 +03:00
# gitlab configuration
export DRONE_GITLAB_URL=""
# email configuration
export DRONE_SMTP_HOST=""
export DRONE_SMTP_PORT=""
export DRONE_SMTP_FROM=""
export DRONE_SMTP_USER=""
export DRONE_SMTP_PASS=""
# worker nodes
# these are optional. If not specified Drone will add
# two worker nodes that connect to $DOCKER_HOST
export DRONE_WORKER_NODES="tcp://0.0.0.0:2375,tcp://0.0.0.0:2375"
```
2014-09-04 06:48:13 +03:00
Or a combination of the two:
```sh
2014-10-12 02:56:03 +03:00
DRONE_GITLAB_URL="https://gitlab.com" droned --config=/path/to/drone.conf
2014-09-04 06:48:13 +03:00
```
## GitHub
In order to setup with GitHub you'll need to register your local Drone installation
with GitHub (or GitHub Enterprise). You can read more about registering an application here:
https://github.com/settings/applications/new
Below are example values when running Drone locally. If you are running Drone on a server
you should replace `localhost` with your server hostname or address.
Homepage URL:
2014-10-01 07:44:15 +03:00
```
http://localhost:8000/
2014-10-01 07:44:15 +03:00
```
Authorization callback URL:
2014-10-01 07:44:15 +03:00
```
http://localhost:8000/api/auth/github.com
2014-10-01 07:44:15 +03:00
```