[GH-ISSUE #2092] ENV variables not taken if settings subsection defined #6864

Closed
opened 2026-04-25 15:49:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @DevNinja90 on GitHub (Dec 16, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/2092

Describe the Bug

The defined env vars here Environment Variables

Currently these three ones

SERVER_SECRET | server.secret
EMAIL_SMTP_PASS | email.smtp_pass
POSTGRES_CONNECTION_STRING | postgres.connection_string

Will not be used or taken if any kind of config subsection e.g. server, email or postgres is defined in the settings fine (config.yml)

E.g. i want to define the postgres pool settings in the config.yml but the connection_string inside my secret (k8s deployment). Then the env var is skipped as a section of the subsettings is defined in my config.yml

Verified with the postgres section, but i think this applies to all of them. 😉

Might also apply to gerbil, but not tested.

Environment

  • OS Type & Version: (k8s deployment)
  • Pangolin Version: 1.13.1

To Reproduce

define some settings in config.yml for postgres and define the connection_string as env var.

Expected Behavior

both configs are respected

Originally created by @DevNinja90 on GitHub (Dec 16, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/2092 ### Describe the Bug The defined env vars here [Environment Variables](https://docs.pangolin.net/self-host/advanced/config-file#environment-variables) Currently these three ones `SERVER_SECRET `| server.secret `EMAIL_SMTP_PASS `| email.smtp_pass `POSTGRES_CONNECTION_STRING `| postgres.connection_string Will not be used or taken if any kind of config subsection e.g. `server`, `email `or `postgres` is defined in the settings fine (config.yml) E.g. i want to define the postgres pool settings in the config.yml but the connection_string inside my secret (k8s deployment). Then the env var is skipped as a section of the subsettings is defined in my config.yml Verified with the postgres section, but i think this applies to all of them. 😉 Might also apply to gerbil, but not tested. ### Environment - OS Type & Version: (k8s deployment) - Pangolin Version: 1.13.1 ### To Reproduce define some settings in config.yml for postgres and define the connection_string as env var. ### Expected Behavior both configs are respected
Author
Owner

@oschwartz10612 commented on GitHub (Dec 16, 2025):

For the postgres string this is because of
pangolin/server/db/pg/driver.ts where it looks to only pull it if the
postgres section is not defined. I will fix that.

For the other two I think they should be overriding correctly but not
100% sure. Could you verify for me if they are actually failing?

<!-- gh-comment-id:3661187446 --> @oschwartz10612 commented on GitHub (Dec 16, 2025): For the postgres string this is because of pangolin/server/db/pg/driver.ts where it looks to only pull it if the postgres section is not defined. I will fix that. For the other two I think they should be overriding correctly but not 100% sure. Could you verify for me if they are actually failing?
Author
Owner

@DevNinja90 commented on GitHub (Dec 17, 2025):

Can confirm the others still work. Thanks!

<!-- gh-comment-id:3663968899 --> @DevNinja90 commented on GitHub (Dec 17, 2025): Can confirm the others still work. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#6864