feat: Allow splitting config files into many files in env directories#344
Merged
Conversation
As an application grows, it will need to define many different config fields. This can easily become unweildy to maintain in a single file. This PR adds support for env-specific config directories. All config files (`.toml` only currently) in the env's directory will be merged into the final config at runtime. The directory is traversed recursively, so nested directory structures are supported.
spencewenski
force-pushed
the
dir-config
branch
from
August 20, 2024 07:28
dde2fc4 to
fbb8af5
Compare
Codecov ReportAttention: Patch coverage is
Continue to review full report in Codecov by Sentry.
|
This was referenced Aug 23, 2024
Closed
Merged
spencewenski
added a commit
that referenced
this pull request
Aug 26, 2024
## 🤖 New release * `roadster`: 0.5.19 -> 0.6.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.6.0](roadster-v0.5.19...roadster-v0.6.0) - 2024-08-25 ### Added - Add a public method to decode a JWT from a string ([#348](#348)) - Mark refresh token headers as sensitive ([#347](#347)) - Make the `User` sea-orm migration enum public ([#346](#346)) - Allow splitting config files into many files in env directories ([#344](#344)) - [**breaking**] App methods take `self` ([#337](#337)) - Remove cookie extraction for `Jwt`, but allow it in `JwtCsrf` ([#332](#332)) - Allow custom sub-claims in provided `Claims` types ([#331](#331)) - Allow jwt from cookie, but only if it's explicitly requested ([#329](#329)) ### Fixed - [**breaking**] Don't expect a "Bearer" token in the auth token cookie ([#340](#340)) ### Other - Remove a `todo` comment ([#345](#345)) - Remove a todo comment from the tracing mod ([#343](#343)) - Update leptos example to use site-addr and env from roadster config ([#341](#341)) - sea-orm workspace dep and upgrade to `1.0.0` ([#336](#336)) - [**breaking**] Update tower to `0.5.0` ([#334](#334)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Spencer Ferris <3319370+spencewenski@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As an application grows, it will need to define many different config fields. This can easily become unweildy to maintain in a single file.
This PR adds support for env-specific config directories. All config files (
.tomlonly currently) in the env's directory will be merged into the final config at runtime. The directory is traversed recursively, so nested directory structures are supported.