Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change quarkus profile using environment variable?

Tags:

quarkus

Right now i have application.yml with

smallrye:
  config:
    profile: prod, postgres

But i want to do something like it

profiles:
  active:
    - ${APP_PROFILE:prod}
    - ${APP_DATABASE_PROFILE:postgres}

How can i do this in quarkus?

like image 324
Dmirii Berrington Avatar asked Oct 19 '25 07:10

Dmirii Berrington


1 Answers

You can set the active profile with the environment variable QUARKUS_PROFILE=PROFILE_NAME or via a system property with -Dquarkus.profile=PROFILE_NAME. You can also specify multiple profiles in these formats separated by commas.

like image 67
Roberto Cortez Avatar answered Oct 22 '25 04:10

Roberto Cortez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!