Skip to content
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

feat: allow to override ORM connection properties #7816

Closed
yurem opened this issue Feb 22, 2024 · 4 comments
Closed

feat: allow to override ORM connection properties #7816

yurem opened this issue Feb 22, 2024 · 4 comments
Assignees
Labels
kind-feature Issue or PR is a new feature request
Milestone

Comments

@yurem
Copy link
Contributor

yurem commented Feb 22, 2024

ORM should use environment/java variables with same names to override ORM configuration properties.

Also it should use environment variables like CONNECTION_URI to override properties like connection.uri and connection-uri

@yurem yurem added this to the 1.1.0 milestone Feb 22, 2024
@yurem yurem self-assigned this Feb 22, 2024
@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Feb 22, 2024
yurem added a commit that referenced this issue Feb 22, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
yuriyz pushed a commit that referenced this issue Feb 22, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
yurem added a commit that referenced this issue Feb 22, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
yurem added a commit that referenced this issue Feb 22, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
@yurem
Copy link
Contributor Author

yurem commented Feb 22, 2024

Here is example to override connection.uri from /etc/default/jans-auth:

java variables:

JAVA_OPTIONS="...-Dconnection.uri=jdbc:postgresql://localhost:5432/jansdb..."

env variables

export CONNECTION_URI=jdbc:postgresql://localhost:5432/jansdb

@ossdhaval
Copy link
Contributor

Here is example to override connection.uri from /etc/default/jans-auth:

java variables:

JAVA_OPTIONS="...-Dconnection.uri=jdbc:postgresql://localhost:5432/jansdb..."

env variables

export CONNECTION_URI=jdbc:postgresql://localhost:5432/jansdb

Hi @yurem

I am updating documents for these changes.

I have a quick question: The steps above will change the property value only for jans-auth module.
But same has to be done for all the other modules which use ORM so that all Janssen Server modules point to the same DB. Is this understanding correct?

@moabu
Copy link
Member

moabu commented Feb 27, 2024

@ossdhaval its actually the opposite in VM. If you pass that env globally it will change for all the modules.

@yurem
Copy link
Contributor Author

yurem commented Feb 27, 2024

right, it depends on scope where you export env properties. Global properties will be used in all jans app. If you need to export them for specific app you can use /etc/default/jans-xyz for example

devrimyatar pushed a commit that referenced this issue Feb 27, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
devrimyatar pushed a commit that referenced this issue Feb 27, 2024
Signed-off-by: Yuriy Movchan <Yuriy.Movchan@gmail.com>
Signed-off-by: Mustafa Baser <mbaser@mail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind-feature Issue or PR is a new feature request
Projects
None yet
Development

No branches or pull requests

4 participants