Rewrite for a PostgreSQL backend

This commit is contained in:
Jakob Borg
2015-03-25 08:16:52 +01:00
parent 51eea3f90b
commit 9d06132743
8 changed files with 566 additions and 512 deletions

View File

@@ -5,7 +5,24 @@ discosrv
This is the global discovery server for the `syncthing` project.
`go get github.com/syncthing/discosrv`
To get it, run `go get github.com/syncthing/discosrv` or download the
[latest build](http://build.syncthing.net/job/discosrv/lastSuccessfulBuild/artifact/)
from the build server.
Or download the latest [Linux build](http://build.syncthing.net/job/discosrv/lastSuccessfulBuild/artifact/).
Usage
-----
The discovery server requires a postgresql backend server. You will need
to create a database and a user with permissions to create tables in it.
Set the database URL in the environment variable `DISCOSRV_DB` before
starting discosrv.
```bash
$ export DISCOSRV_DB="postgres://user:password@localhost/databasename"
$ discosrv
```
The appropriate tables and indexes will be created at first startup. If
it doesn't exit with an error, you're fine.
See `discosrv -help` for other options.