README: indicate change to ENV for configuration, refresh systemd unit file, introduce Gorm and db migration tool
This commit is contained in:
parent
1fe9553cc9
commit
5cb0a59f00
14
README.md
14
README.md
@ -34,6 +34,9 @@ https://rushlink.local` to the binary (e.g. in the `systemd` unit file).
|
|||||||
|
|
||||||
## Sample `systemd` unit file
|
## Sample `systemd` unit file
|
||||||
|
|
||||||
|
As of 1fe9553cc9, `rushlink` expects its database and file store configuration
|
||||||
|
in environment variables.
|
||||||
|
|
||||||
```
|
```
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=nginx.service
|
WantedBy=nginx.service
|
||||||
@ -42,7 +45,8 @@ WantedBy=nginx.service
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=rushlink
|
User=rushlink
|
||||||
Group=nogroup
|
Group=nogroup
|
||||||
ExecStart=/var/lib/rushlink/rushlink -database /var/lib/rushlink/db -file-store /var/lib/rushlink/filestore -root_url https://rushlink.local
|
Environment=RUSHLINK_DATABASE_DRIVER=sqlite RUSHLINK_DATABASE_PATH=/var/lib/rushlink/rushlink.sqlite3 RUSHLINK_FILE_STORE_PATH=/var/lib/rushlink/filestore/
|
||||||
|
ExecStart=/var/lib/rushlink/rushlink -root_url https://rushlink.local
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -65,10 +69,16 @@ are the exceptions:
|
|||||||
|
|
||||||
## Database
|
## Database
|
||||||
|
|
||||||
We use [`go.etcd.io/bbolt`]. This file should be the *only* file
|
Before 1fe9553cc9 we used [`go.etcd.io/bbolt`]. This file should be the *only* file
|
||||||
apart from our monolithic binary. All settings and keys should go in here.
|
apart from our monolithic binary. All settings and keys should go in here.
|
||||||
Any read-only data resides in the binary file (possibly compressed).
|
Any read-only data resides in the binary file (possibly compressed).
|
||||||
|
|
||||||
|
Now, we use Gorm and support SQLite and PostgreSQL as backends.
|
||||||
|
|
||||||
|
We provide a migration binary in `cmd/rushlink-migrate-db/`. In environment
|
||||||
|
variables, the destination database is configured, and the binary itself
|
||||||
|
expects a few flags. Refer to the source for the exact flags.
|
||||||
|
|
||||||
[`go.etcd.io/bbolt`]: `go.etcd.io/bbolt`
|
[`go.etcd.io/bbolt`]: `go.etcd.io/bbolt`
|
||||||
|
|
||||||
## Namespacing
|
## Namespacing
|
||||||
|
Loading…
Reference in New Issue
Block a user