Set the session key from an env variable

This commit is contained in:
Las Zenow 2020-12-03 15:43:47 +00:00
parent fe36b1d23c
commit b89616a904
2 changed files with 11 additions and 3 deletions

View file

@ -29,12 +29,19 @@ $ echo "CREATE EXTENSION pg_trgm;"|psql trantor
Now you can install Trantor itself:
```
# go get gitlab.com/trantor/trantor
$ git clone gitlab.com/trantor/trantor
$ cd trantor
$ go build
```
Generate a random session key:
```
$ base64 /dev/random | head -c 50
```
You can run it (using `/var/lib/trantor` for storage):
```
# $GOPATH/bin/trantor -assets $GOPATH/src/pkg/gitlab.com/trantor/trantor/ -store /var/lib/trantor
$ SESSION_KEY=<session> ./trantor -store /var/lib/trantor
```
The first time you run it, the database will be initialized. To initialize an admin user, include the -set-admin-user and -set-admin-pass variables