Skip to content

Commit 8c5f3db

Browse files
authored
Merge pull request #525 from damongolding/task/release
required config fix when mixing ENV & config
2 parents 4325f3e + 2be09f5 commit 8c5f3db

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

internal/config/config_validation.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,15 @@ func checkSchema(config map[string]any, level string) bool {
373373
return true
374374
}
375375

376+
// if we are using a config.yaml file but supplying immich_api_key || immich_url via ENVs get them
377+
if v, ok := config["immich_api_key"]; !ok || v == "" {
378+
config["immich_api_key"] = os.Getenv("KIOSK_IMMICH_API_KEY")
379+
}
380+
381+
if v, ok := config["immich_url"]; !ok || v == "" {
382+
config["immich_url"] = os.Getenv("KIOSK_IMMICH_URL")
383+
}
384+
376385
typed := ConfigTypes(config, Config{})
377386
for k, v := range config {
378387
if _, ok := typed[k]; !ok {

taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "3"
22
env:
3-
VERSION: 0.23.2-beta.1
3+
VERSION: 0.23.3
44

55
includes:
66
frontend:

0 commit comments

Comments
 (0)