Compare commits

...

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
c2dae03ba0 Add runmode env var support and default to prod in Docker
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
2026-02-08 16:22:12 +00:00
copilot-swe-agent[bot]
e191a75ef5 Initial plan 2026-02-08 16:14:27 +00:00
2 changed files with 4 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ import (
func init() {
// this array contains the beego configuration items that may be modified via env
presetConfigItems := []string{"httpport", "appname"}
presetConfigItems := []string{"httpport", "appname", "runmode"}
for _, key := range presetConfigItems {
if value, ok := os.LookupEnv(key); ok {
err := web.AppConfig.Set(key, value)

View File

@@ -6,5 +6,8 @@ fi
if [ -z "${dataSourceName:-}" ]; then
export dataSourceName="file:casdoor.db?cache=shared"
fi
if [ -z "${runmode:-}" ]; then
export runmode=prod
fi
exec /server