Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify quarkus.config.locations and multiple profiles documentation #36102

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion docs/src/main/asciidoc/config-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,32 @@
<1> This is a user-defined configuration property.
<2> This is a configuration property consumed by the `quarkus-vertx-http` extension.

TIP: It works in the exact same way as Quarkus Application configuration file `application.properties`. Recommendation

Check warning on line 164 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 164, "column": 37}}}, "severity": "INFO"}
is to use Quarkus `application.properties`.

=== Locations

Additionally to the default config locations, Quarkus provides a way to scan additional locations for configuration
properties files.

The `quarkus.config.locations` configuration property accepts multiple locations separated by a comma `,` and each
must represent a valid `URI`. The supported `URI` schemes are:

- file or directory (`file:`)
- classpath resource
- jar resource (`jar:`)
- http resource (`http:`)

All loaded sources use the same ordinal of the source that found the `quarkus.config.locations` configuration
property. For instance, if `quarkus.config.locations` is set as a system property, then all loaded sources have their

Check warning on line 181 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 181, "column": 62}}}, "severity": "INFO"}
ordinals set to `400` (system properties use `400` as their ordinal). The ordinal may be overridden directly for each

Check warning on line 182 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 182, "column": 83}}}, "severity": "WARNING"}
config source by setting the `config_ordinal` property and the ordinal value. The `config_ordinal` property only
affects the ordinal of the source in which is being set. Sources are sorted first by their ordinal, then by location

Check warning on line 184 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using ', which (non restrictive clause preceded by a comma)' or 'that (restrictive clause without a comma)' rather than 'which'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using ', which (non restrictive clause preceded by a comma)' or 'that (restrictive clause without a comma)' rather than 'which'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 184, "column": 37}}}, "severity": "INFO"}
order, and finally by loading order.

=== Additional Config Sources

Check warning on line 187 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Additional Config Sources'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Additional Config Sources'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 187, "column": 5}}}, "severity": "INFO"}

Quarkus provides additional extensions which cover other configuration formats and stores:

Check warning on line 189 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using ', which (non restrictive clause preceded by a comma)' or 'that (restrictive clause without a comma)' rather than 'which'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using ', which (non restrictive clause preceded by a comma)' or 'that (restrictive clause without a comma)' rather than 'which'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 189, "column": 39}}}, "severity": "INFO"}

* xref:config-yaml.adoc[YAML]
* https://github.com/quarkiverse/quarkus-vault[HashiCorp Vault]
Expand Down Expand Up @@ -377,10 +397,12 @@

[WARNING]
====
The profile aware file must be present in the exact same location as the main `application.properties` file.
A profile aware file is only loaded if the unprofiled `application.properties` is also available in the same location
and the file extension matches between the files. This is required to keep a consistent loading order and pair all the
resources together.
====

=== Parent Profile

Check warning on line 405 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Parent Profile'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Parent Profile'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 405, "column": 5}}}, "severity": "INFO"}

A Parent Profile adds one level of hierarchy to the current profile. The configuration `quarkus.config.profile.parent`
accepts a single profile name.
Expand Down Expand Up @@ -461,7 +483,13 @@
* `my.prop` value is 5678.
* `another.prop` value is 1234.

[WARNING]
====
Multiple profiles priority work in reverse order. With `quarkus.profile=common,dev`, Quarkus first checks the `dev`
profile and then the `common` profile.
====

=== Default Runtime Profile

Check warning on line 492 in docs/src/main/asciidoc/config-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Default Runtime Profile'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Default Runtime Profile'.", "location": {"path": "docs/src/main/asciidoc/config-reference.adoc", "range": {"start": {"line": 492, "column": 5}}}, "severity": "INFO"}

The default Quarkus runtime profile is set to the profile used to build the application:

Expand Down
Loading