Skip to content

Commit

Permalink
Document the use of config/application.properties
Browse files Browse the repository at this point in the history
Fixes: #4452
  • Loading branch information
geoand committed Oct 9, 2019
1 parent ec07f7f commit 27a5a40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/main/asciidoc/application-configuration-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,17 @@ You can override these runtime properties with the following mechanisms (in decr
2. using environment variables:
* for a runner jar: `export QUARKUS_DATASOURCE_PASSWORD=youshallnotpass ; java -jar target/myapp-runner.jar`
* for a native executable: `export QUARKUS_DATASOURCE_PASSWORD=youshallnotpass ; ./target/myapp-runner`
3. using a configuration file placed in `$PWD/config/application.properties`
* By placing an `application.properties` file inside a directory named `config` which resides in the directory where the application runs, any runtime properties defined
in that file will override the default configuration. Furthermore any runtime properties added to this file that were not part of the original `application.properties` file
_will also_ be taken into account.
* This works in the same way for runner jar and the native executable

NOTE: Environment variables names are following the conversion rules of link:https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/configsources.asciidoc#default-configsources[Eclipse MicroProfile]

NOTE: The `config/application.properties` features is available in development mode as well. To make use of it, `config/application.properties` needs to be placed inside the build tool's output directory (`target` for Maven and `build` for Gradle).
Keep in mind however that any cleaning operation from the build tool like `mvn clean` or `gradle clean` will remove the `config` directory as well.

=== Configuration Profiles

Quarkus supports the notion of configuration profiles. These allow you to have multiple configuration in the same file and
Expand Down

0 comments on commit 27a5a40

Please sign in to comment.