chore: parametrize db path #181
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 48s
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 48s
This commit is contained in:
2
main.go
2
main.go
@@ -40,7 +40,7 @@ func run(ctx context.Context, env func(string) string) {
|
||||
serverSettings := types.NewServerSettingsFromEnv(env)
|
||||
|
||||
// init db
|
||||
db, err := sql.Open("sqlite3", "./data.db")
|
||||
db, err := sql.Open("sqlite3", serverSettings.DbPath)
|
||||
if err != nil {
|
||||
log.Fatal("Could not open Database data.db: ", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user