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

openHIM docker always fallback to localhost #1213

Open
maurochss opened this issue Nov 1, 2023 · 4 comments
Open

openHIM docker always fallback to localhost #1213

maurochss opened this issue Nov 1, 2023 · 4 comments

Comments

@maurochss
Copy link

Hi all,

I am trying to start openHIM using the docker-compose. The steps I am using are:

  1. git clone https://github.com/jembi/openhim-common.git
  2. Modified the default.json by adding the server name.
  3. docker-compose build && docker-compose up -d

After doing this, the default.json hostname changes back to localhost instead of the hostname I defined prior to start.

--
Regards,
Mauro Chan Son Suleimane

@maurochss
Copy link
Author

Hi all,

Whenever I change the localhost to (e.g. openhimdev.mydomain.org) on default.json, when I start the containers with docker-
compose it falls back to localhost.

Bellow my default.json.

{
"version": "1.18.2",
"minimumCoreVersion": "5.2.0",
"protocol": "https",
"host": "localhost",
"hostPath": "",
"port": "8080",
"title": "Admin Console",
"footerTitle": "OpenHIM Administration Console",
"footerPoweredBy": "Powered by OpenHIM",
"loginBanner": "",
"mediatorLastHeartbeatWarningSeconds": 60,
"mediatorLastHeartbeatDangerSeconds": 120,
"showLoginForm": true,
"ssoEnabled": false,
"keyCloakUrl": "http://localhost:9088",
"keyCloakRealm": "platform-realm",
"keyCloakClientId": "openhim-oauth"
}

@bradsawadye
Copy link
Contributor

Hi @maurochss specify the host using an environment variable like done here

@maurochss
Copy link
Author

Hi @bradsawadye ,

Thanks, it did work but unfortunately the heartbeat is not opening. Port 8080 is opened, I disabled the firewall and still I can't access from the outside.

I was thinking in disable https for openHIM and put an NGINX instance in front. Is that feasible?

Have you done it? If so which variable should I change to make it http and not https?

--
Regards,
Mauro Chan Son Suleimane

@bradsawadye
Copy link
Contributor

Hi @maurochss,

We always have ngnx in front of the openhim. The heartbeat is on port 8080 and only retrievable via https. Have a look at this https://github.com/jembi/platform , its a toolbox of ours with openhim and a reverse proxy services

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

No branches or pull requests

2 participants