-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Environment profiles, builds and version control and builds #846
Comments
I understand what you mean, and this is indeed an issue.
|
IMHO while in the age of SaaS and PaaS, environment variables are the most technically correct, I believe they are only ever convenient in large scale deployments. For 95% of the cases, they are needlessly inconvenient to setup and manage. In jhipster, environment variables are already supported for those who need that. If you think the solution I proposed might make sense for jhipster to support by default, I'd be willing to work on a PR (wouldn't be sure to work on 1.x or master though) |
Note that I never used it myself, but you can also easily externalize your configuration: |
That's interesting, because according to the docs, an Not sure if that's only in my setup. |
you can easly externalise conf with jvm params like : -Dspring.config.location=/data/prog/application-XXX-env.yml |
If I understand correctly that would not load the bundled configurations in |
The bundled configurations will be loaded but they will be overridden by the external properties file. Here is the documentation from spring-boot (http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files)
|
Thanks for the correction. I'm unable to get that working with jhipster although it works fine with a vanilla spring boot project in the manner you described. The behavior I'm seeing is that the externalized config is loaded, but any value defined in the bundled configs take precedence. |
@amr so I understand this would be OK for you, if you didn't have that issue -> keep us updated if you have this working or not, I'll close this ticket and if you still have this issue can you create another ticket (because it's another problem)? |
You are right |
I hope I didn't overlook the obvious. But here goes...
Currently, jhipster promotes that all settings exist in a config file under resources and by default those are tracked in git. Some of the settings in a given
application-*.yml
files are machine specific, and others are specific to the type of environment (i.e. production, development, etc).I think that the workflow that jhipster should promote (or at least support) is that machine specific settings should live in a file that:
It's simply a file on the machine with its specific settings such as database connection parameters. Therefore, my project's
README.md
file would have a setup instruction that looks like: "Copy the bundledlocal.yml-sample
aslocal.yml
and modify its settings accordingly to match your environment". Well, you get the idea.The text was updated successfully, but these errors were encountered: