fixed incorrect docs, removed toml depdendency

This commit is contained in:
Brad Rydzewski 2015-08-03 22:46:58 -07:00
parent 4270573536
commit 001e6c9f5f
4 changed files with 8 additions and 14 deletions

View file

@ -5,8 +5,8 @@
Drone comes with support for MySQL as an alternate database engine. To enable Postgres, you should specify the following environment variables:
```
DATASTORE_DRIVER="mysql"
DATASTORE_CONFIG="root:pa55word@tcp(localhost:3306)/drone"
DATABASE_DRIVER="mysql"
DATABASE_DATASOURCE="root:pa55word@tcp(localhost:3306)/drone"
```
## MySQL connection

View file

@ -4,8 +4,8 @@
Drone comes with support for Postgres as an alternate database engine. To enable Postgres, you should specify the following environment variables:
```
DATASTORE_DRIVER="postgres"
DATASTORE_CONFIG="postgres://root:pa55word@127.0.0.1:5432/postgres"
DATABASE_DRIVER="postgres"
DATABASE_DATASOURCE="postgres://root:pa55word@127.0.0.1:5432/postgres"
```
## Postgres connection

View file

@ -3,13 +3,13 @@
Drone uses SQLite as the default database with zero configuration required. In order to customize the SQLite database configuration you should specify the following environment variables:
```
DATASTORE_DRIVER="sqlite3"
DATASTORE_CONFIG="/var/lib/drone/drone.sqlite"
DATABASE_DRIVER="sqlite3"
DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite"
```
## Sqlite3 connection
The components of this connection string are:
The components of the datasource connection string are:
* `path` local path to sqlite database. The default value is `/var/lib/drone/drone.sqlite`.

View file

@ -2,13 +2,11 @@ package config
import (
"fmt"
"io/ioutil"
"os"
"path"
"strings"
log "github.com/drone/drone/Godeps/_workspace/src/github.com/Sirupsen/logrus"
// "github.com/drone/drone/Godeps/_workspace/src/github.com/naoina/toml"
"github.com/drone/drone/Godeps/_workspace/src/github.com/vrischmann/envconfig"
)
@ -98,11 +96,7 @@ type Config struct {
// Load loads the configuration file and reads
// parameters from environment variables.
func Load(path string) (*Config, error) {
data, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
}
return LoadBytes(data)
return LoadBytes([]byte{})
}
// LoadBytes reads the configuration file and