updated docs for using custom driver

This commit is contained in:
Brad Rydzewski 2014-10-01 11:58:27 -07:00
parent 7f4f5bdfbc
commit 61c8811847
2 changed files with 30 additions and 1 deletions

View file

@ -19,6 +19,27 @@ wget downloads.drone.io/exp/drone.deb
sudo dpkg -i drone.deb
```
## 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:
```
# to use postgres
[datasource]
driver="postgres"
source="host=172.17.0.2 user=postgres dbname=drone sslmode=disable"
# to use mysql
[datasource]
driver="mysql"
source="root@tcp(172.17.0.2:3306)/drone"
```
## Setup
We are in the process of moving configuration out of the UI and into configuration
@ -33,6 +54,10 @@ The configuration file is in TOML format:
```toml
[datasource]
driver=""
source=""
[registration]
open=true
@ -73,6 +98,10 @@ Or you can use environment variables
```sh
# custom database settings
export DRONE_DATASOURCE_DRIVER=""
export DRONE_DATASOURCE_SOURCE=""
# enable users to self-register
export DRONE_REGISTRATION_OPEN=false

View file

@ -79,7 +79,7 @@ func main() {
flag.StringVar(&prefix, "prefix", "DRONE_", "")
flag.Parse()
config.StringVar(&datasource, "database-path", "drone.sqlite")
config.StringVar(&datasource, "database-source", "drone.sqlite")
config.StringVar(&driver, "database-driver", "sqlite3")
config.Var(&nodes, "worker-nodes")
config.BoolVar(&open, "registration-open", false)