Change default folder & db path to data/*

This commit is contained in:
Jannis Mattheis 2018-05-02 19:25:54 +02:00 committed by Jannis Mattheis
parent ae89184d76
commit 0eb4fe0bb0
3 changed files with 7 additions and 7 deletions

2
.gitignore vendored
View File

@ -8,5 +8,5 @@ coverage.txt
*/node_modules/ */node_modules/
**/*-packr.go **/*-packr.go
config.yml config.yml
gotify.db data/
images/ images/

View File

@ -55,18 +55,18 @@ server:
letsencrypt: letsencrypt:
enabled: false # if the certificate should be requested from letsencrypt enabled: false # if the certificate should be requested from letsencrypt
accepttos: false # if you accept the tos from letsencrypt accepttos: false # if you accept the tos from letsencrypt
cache: certs # the directory of the cache from letsencrypt cache: data/certs # the directory of the cache from letsencrypt
hosts: # the hosts for which letsencrypt should request certificates hosts: # the hosts for which letsencrypt should request certificates
- mydomain.tld - mydomain.tld
- myotherdomain.tld - myotherdomain.tld
database: # for database see (configure database section) database: # for database see (configure database section)
dialect: sqlite3 dialect: sqlite3
connection: gotify.db connection: data/gotify.db
defaultuser: # on database creation, gotify creates an admin user defaultuser: # on database creation, gotify creates an admin user
name: admin # the username of the default user name: admin # the username of the default user
pass: admin # the password of the default user pass: admin # the password of the default user
passstrength: 10 # the bcrypt password strength (higher = better but also slower) passstrength: 10 # the bcrypt password strength (higher = better but also slower)
uploadedimagesdir: images # the directory for storing uploaded images uploadedimagesdir: data/images # the directory for storing uploaded images
``` ```
### Environment ### Environment

View File

@ -20,21 +20,21 @@ type Configuration struct {
LetsEncrypt struct { LetsEncrypt struct {
Enabled *bool `default:"false"` Enabled *bool `default:"false"`
AcceptTOS *bool `default:"false"` AcceptTOS *bool `default:"false"`
Cache string `default:"certs"` Cache string `default:"data/certs"`
Hosts []string Hosts []string
} }
} }
} }
Database struct { Database struct {
Dialect string `default:"sqlite3"` Dialect string `default:"sqlite3"`
Connection string `default:"gotify.db"` Connection string `default:"data/gotify.db"`
} }
DefaultUser struct { DefaultUser struct {
Name string `default:"admin"` Name string `default:"admin"`
Pass string `default:"admin"` Pass string `default:"admin"`
} }
PassStrength int `default:"10"` PassStrength int `default:"10"`
UploadedImagesDir string `default:"images"` UploadedImagesDir string `default:"data/images"`
} }
// Get returns the configuration extracted from env variables or config file. // Get returns the configuration extracted from env variables or config file.