Skip to content

Rework config parsing#967

Open
jmattheis wants to merge 4 commits into
masterfrom
env
Open

Rework config parsing#967
jmattheis wants to merge 4 commits into
masterfrom
env

Conversation

@jmattheis
Copy link
Copy Markdown
Member

@jmattheis jmattheis commented May 26, 2026

See the gotify-server.env.example for how it works. The new https://gotify.net/docs/config will just reference gotify-server.env.example, so it should be standalone and understandable.

  • No yaml config anymore
  • The list syntax changed from a yaml format to comma separated.
  • Support loading settings from a file via _FILE
  • Allow setting defining a custom path via $GOTIFY_CONFIG_FILE
  • Supports gotify-server.env.local for local development, you can put GOTIFY_SERVER_PORT in there, and it works for the dev ui and server.

I've initially wanted to use a library (https://github.com/caarlos0/env) for the env parsing, but it didn't support _FILE natively. and manually implementing it doesn't seems to complex.

Fixes #366
Fixes #392

@jmattheis jmattheis requested a review from a team as a code owner May 26, 2026 20:17
@jmattheis jmattheis changed the title Env Rework config parsing May 26, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 72.97297% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.35%. Comparing base (0e32e56) to head (2e71989).

Files with missing lines Patch % Lines
config/parse.go 60.65% 17 Missing and 7 partials ⚠️
config/file.go 62.74% 14 Missing and 5 partials ⚠️
app.go 0.00% 10 Missing ⚠️
config/error.go 0.00% 4 Missing ⚠️
config/config.go 97.40% 1 Missing and 1 partial ⚠️
api/oidc.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #967      +/-   ##
==========================================
- Coverage   74.46%   74.35%   -0.12%     
==========================================
  Files          62       66       +4     
  Lines        3008     3193     +185     
==========================================
+ Hits         2240     2374     +134     
- Misses        605      643      +38     
- Partials      163      176      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jmattheis added 4 commits May 26, 2026 22:38
This will make testing easier, as it's more similar to the actual prod
deployment. We don't have to rewrite anything in vite, as the host and
origin is the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Secrets? gotify ignores command line arguments / no way to redirect config

1 participant