Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: fix env binding

Steven5ad00c3a506e
diff --git a/bin/memos/main.go b/bin/memos/main.go
index 3e5d68a29..f2e8d6c0a 100644
--- a/bin/memos/main.go
+++ b/bin/memos/main.go
@@ -138,13 +138,16 @@ func init() {
panic(err)
}
+ viper.SetEnvPrefix("memos")
+ viper.AutomaticEnv()
+ viper.BindEnv("password-auth", "MEMOS_PASSWORD_AUTH")
+
viper.SetDefault("mode", "demo")
viper.SetDefault("driver", "sqlite")
viper.SetDefault("addr", "")
viper.SetDefault("port", 8081)
viper.SetDefault("public", false)
viper.SetDefault("password-auth", true)
- viper.SetEnvPrefix("memos")
instanceProfile = &profile.Profile{
Mode: viper.GetString("mode"),