Skip to content

Read env vars for server name and env name #46

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rogin
Copy link
Contributor

@rogin rogin commented Apr 19, 2025

Written to fix my own request here. NextGen merged it into their 4.6.0 release, so it's missing here.

Original test notes written here:

Used a freshly built server under /server/setup.

Start server with java -jar .\mirth-server-launcher.jar, and bring the server down after each test.

Test 1: No envvars set. Start server. Complete the admin change password modal. Validate values are blank in UI.
Test 2: set envvar MC_SERVER_NAME = 'Staging'. Start server. Validate its value in UI.
Test 3: set envvar MC_ENV_NAME = 'Sys-001'. Start server. Validate both values in UI.
Test 4: set envvar MC_SERVER_NAME = 'Prod', MC_ENV_NAME = 'Sys-002'. Start server. Validate both values in UI.
Test 5: Unset envvars MC_SERVER_NAME and MC_ENV_NAME. Start server. Validate both values in UI are same used in test 4 (as they've been stored in DB).

@jonbartels
Copy link
Contributor

jonbartels commented Apr 20, 2025

This PR eliminates the need for booter mcgooter

jonbartels
jonbartels previously approved these changes Apr 20, 2025
Copy link
Member

@tonygermano tonygermano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: would the configuration controller be a more appropriate place for this functionality?

Or is there a reason it must be in Mirth.java?

@rogin
Copy link
Contributor Author

rogin commented Jul 14, 2025

question: would the configuration controller be a more appropriate place for this functionality?

Or is there a reason it must be in Mirth.java?

Yep, a single call to the controller is likely cleaner.

Signed-off-by: Richard Ogin <rogin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants