Update configuration to use environment variables for self-hosted deployment
This commit is contained in:
parent
71030913cd
commit
498caab581
3 changed files with 28 additions and 1 deletions
|
@ -141,6 +141,8 @@ func LoadConfig() *Config {
|
|||
panic(err)
|
||||
}
|
||||
fmt.Printf("--ConfigLoad name : %s ", config.Name)
|
||||
viper.SetEnvPrefix("DT")
|
||||
viper.AutomaticEnv()
|
||||
configEnvironmentOverrides(&config)
|
||||
return &config
|
||||
|
||||
|
|
25
config/selfhosted.env
Normal file
25
config/selfhosted.env
Normal file
|
@ -0,0 +1,25 @@
|
|||
DT_NAME=selfhosted
|
||||
DT_IS_DONE_TICK_DOT_COM=false
|
||||
DT_IS_USER_CREATION_DISABLED=false
|
||||
DT_TELEGRAM_TOKEN=
|
||||
DT_PUSHOVER_TOKEN=
|
||||
DT_DATABASE_TYPE=sqlite
|
||||
DT_DATABASE_MIGRATION=true
|
||||
DT_JWT_SECRET=secret
|
||||
DT_JWT_SESSION_TIME=168h
|
||||
DT_JWT_MAX_REFRESH=168h
|
||||
DT_SERVER_PORT=2021
|
||||
DT_SERVER_READ_TIMEOUT=2s
|
||||
DT_SERVER_WRITE_TIMEOUT=1s
|
||||
DT_SERVER_RATE_PERIOD=60s
|
||||
DT_SERVER_RATE_LIMIT=300
|
||||
DT_SERVER_CORS_ALLOW_ORIGINS=http://localhost:5173,http://localhost:7926,https://localhost,capacitor://localhost
|
||||
DT_SERVER_SERVE_FRONTEND=true
|
||||
DT_SCHEDULER_JOBS_DUE_JOB=30m
|
||||
DT_SCHEDULER_JOBS_OVERDUE_JOB=3h
|
||||
DT_SCHEDULER_JOBS_PRE_DUE_JOB=3h
|
||||
DT_EMAIL_HOST=
|
||||
DT_EMAIL_PORT=
|
||||
DT_EMAIL_KEY=
|
||||
DT_EMAIL_EMAIL=
|
||||
DT_EMAIL_APP_HOST=
|
|
@ -1,4 +1,4 @@
|
|||
name: "selhosted"
|
||||
name: "selfhosted"
|
||||
is_done_tick_dot_com: false
|
||||
is_user_creation_disabled: false
|
||||
telegram:
|
||||
|
|
Loading…
Add table
Reference in a new issue