[self-hosted] specify sql file location of auth, activity and main store (#5487)

This commit is contained in:
Misha Bragin
2026-03-03 12:53:16 +02:00
committed by GitHub
parent 47133031e5
commit 403babd433
6 changed files with 50 additions and 8 deletions

View File

@@ -140,6 +140,9 @@ func initializeConfig() error {
os.Setenv("NB_STORE_ENGINE_MYSQL_DSN", dsn)
}
}
if file := config.Server.Store.File; file != "" {
os.Setenv("NB_STORE_ENGINE_SQLITE_FILE", file)
}
if engine := config.Server.ActivityStore.Engine; engine != "" {
engineLower := strings.ToLower(engine)
@@ -151,6 +154,9 @@ func initializeConfig() error {
os.Setenv("NB_ACTIVITY_EVENT_POSTGRES_DSN", dsn)
}
}
if file := config.Server.ActivityStore.File; file != "" {
os.Setenv("NB_ACTIVITY_EVENT_SQLITE_FILE", file)
}
log.Infof("Starting combined NetBird server")
logConfig(config)