Lagom application run profiles?

Does Lagom have a concept or profiles?
Like Spring, for example.

Something which enables you to run the app with a profile, which then picks and load properties depending on profile value.

For example, when running the app, you’d provide a profile name via some kind of environment variable, system property, whatever, and then it would load logging config and configuration properties for that profile.

Would (ab)using include command be a good way to achieve this?
Like having an include statement in application.conf which references application-${PROFILE}.conf?

Hi,

There are no explicit profiles but check this.
You can use system property -Dconfig.resource to override conf per environment. You would set it via yaml per environment.
For logging same rules apply with system property -Dlogger.resource. Check this.
You can see yaml conf with this kind of overrides here.

Hope this helps

Br,
Alan

Thx, Alan!

How “bad” of an approach is that? It feels like Lagom is trying to force me to use a single application.conf, which should take environment variables in mind, so that all you have to do to run a Docker image is specify those variables, instead of injecting a config file from somewhere else.

application.conf is configured by default and we use it in dev environment.
For production we use production.conf that replaces application.conf.
We also have general.conf that is environment independent configuration and is included in both (application.conf and production.conf).
It is not an idea to use ENV in conf it self but to “hook up” environment specific conf by java system property.
Of course you can use ENV in conf for other purposes.