mirror of https://github.com/stashapp/stash.git
Enviroment Variables (#45)
* testing env version * added STASH_CACHE env * Remove debug prints used for testing * Update manager.go
This commit is contained in:
parent
bcc70af7e5
commit
7742024dfb
|
@ -36,6 +36,7 @@ func Initialize() *singleton {
|
|||
_ = utils.EnsureDir(paths.GetConfigDirectory())
|
||||
initConfig()
|
||||
initFlags()
|
||||
initEnvs()
|
||||
instance = &singleton{
|
||||
Status: Idle,
|
||||
Paths: paths.NewPaths(),
|
||||
|
@ -91,6 +92,16 @@ func initFlags() {
|
|||
}
|
||||
}
|
||||
|
||||
func initEnvs() {
|
||||
viper.SetEnvPrefix("stash") // will be uppercased automatically
|
||||
viper.BindEnv("host") // STASH_HOST
|
||||
viper.BindEnv("port") // STASH_PORT
|
||||
viper.BindEnv("stash") // STASH_STASH
|
||||
viper.BindEnv("generated") // STASH_GENERATED
|
||||
viper.BindEnv("metadata") // STASH_METADATA
|
||||
viper.BindEnv("cache") // STASH_CACHE
|
||||
}
|
||||
|
||||
func initFFMPEG() {
|
||||
configDirectory := paths.GetConfigDirectory()
|
||||
ffmpegPath, ffprobePath := ffmpeg.GetPaths(configDirectory)
|
||||
|
|
Loading…
Reference in New Issue