Specify location of application.yaml

268 views
Skip to first unread message

Nicolas Brasey

unread,
Dec 16, 2021, 11:46:23 AM12/16/21
to Quarkus Development mailing list
Hi all!

I need to have my config file "application.yaml" in a different location than in the config dir directory next to quarkus. I want to comply with standard linux paths and put my application.yaml in

/etc/myapp/application.yaml

where the quarkus binaries will be elsewhere.

Is there a way to provide that config location using a JVM property ?

Something like below would be ideal:

java  -jar /usr/local/my-app/quarkus-app/quarkus-run.jar -Dconfig.location=/etc/myapp/application.yaml

I tried to add the directory /etc/myapp to the classpath but it does not work:

java  -cp "/etc/myapp:*" -jar /usr/local/my-app/quarkus-app/quarkus-run.jar


Thanks a lot for any hints!


Cheers,
Nicolas



Martin Kouba

unread,
Dec 16, 2021, 11:54:11 AM12/16/21
to nicolas...@gmail.com, Quarkus Development mailing list
Hi Nicolas,

have you tried the quarkus.config.locations [1] config property?

Martin

[1]
https://quarkus.io/guides/config-reference#quarkus-config-config_quarkus.config.locations
> --
> You received this message because you are subscribed to the Google
> Groups "Quarkus Development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to quarkus-dev...@googlegroups.com
> <mailto:quarkus-dev...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/quarkus-dev/9db66c9b-ff77-4e86-a76e-1a856c26106dn%40googlegroups.com
> <https://groups.google.com/d/msgid/quarkus-dev/9db66c9b-ff77-4e86-a76e-1a856c26106dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Martin Kouba
Software Engineer
Red Hat, Czech Republic

Reply all
Reply to author
Forward
0 new messages