medic / cht-interoperability

CHT - eCHIS interoperability project
GNU Affero General Public License v3.0
2 stars 3 forks source link

Dockerise CHT Setup and Interoperability #37

Closed samuelimoisili closed 1 year ago

samuelimoisili commented 1 year ago

Description

Adds a script "dockerise" cht-core and automate the configuration process. This PR nullifies https://github.com/medic/interoperability/issues/22 and depends on https://github.com/medic/interoperability/pull/16 for the cht configuration.

Closes medic/interoperability#24

Code review checklist

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

samuelimoisili commented 1 year ago

I couldn't login to https://*.my.local-ip.co/, this failed with net::ERR_CERT_AUTHORITY_INVALID. Did you manage to login successfully locally?

I'll update the docs to show the URL is now http://localhost:5688

samuelimoisili commented 1 year ago

I assume that this PR depends heavily on the last changes from #28? For example, when creating a patient in the CHT, I couldn't see it in the OpenHIM Admin Console.

Yeah, it does.

andrablaj commented 1 year ago

@samuelimoisili thank you for the fix!

I'll update the docs to show the URL is now http://localhost:5688/

Do you plan to add this update in this PR or in a different one? I would like to understand if we should review this PR now or wait for a new addition.

samuelimoisili commented 1 year ago

@samuelimoisili thank you for the fix!

I'll update the docs to show the URL is now http://localhost:5688/

Do you plan to add this update in this PR or in a different one? I would like to understand if we should review this PR now or wait for a new addition.

samuelimoisili commented 1 year ago

I've pushed the changes to the doc. You can review it now, thanks.

andrablaj commented 1 year ago

Thanks for the update. What I meant here was that the nginx-1 container, which allows running CHT behind a local proxy doesn't work as expected. When I try to login, I get an net::ERR_CERT_AUTHORITY_INVALID error.

Container logs:

2023-03-03 18:41:46 Launching Nginx 2023-03-03 18:41:46 2023/03/03 18:41:46 [emerg] 67#67: io_setup() failed (38: Function not implemented) 2023-03-03 18:41:46 2023/03/03 18:41:46 [emerg] 71#71: io_setup() failed (38: Function not implemented) 2023-03-03 18:41:46 2023/03/03 18:41:46 [emerg] 70#70: io_setup() failed (38: Function not implemented) 2023-03-03 18:41:46 2023/03/03 18:41:46 [emerg] 69#69: io_setup() failed (38: Function not implemented)

Do you manage to login correctly behind a local proxy?

samuelimoisili commented 1 year ago

Do you manage to login correctly behind a local proxy?

I'm using the production setup, which has the default instance running on https://localhost:80. I can login in from this https://localhost:80 without any hassle.

andrablaj commented 1 year ago

Thank you for the clarifications. @njogz is the production setup compatible with the flow in #28 or will we need to modify the configurations of the mediator to be able to access the CHT?

njogz commented 1 year ago

@andrablaj yes it should still work if the CHT_URL env variable is properly set.

andrablaj commented 1 year ago

@lorerod this PR should enable you to test #28 in a more straightforward way, rather than having to run several tools locally separately.

andrablaj commented 1 year ago

@samuelimoisili @njogz I tried to run the Docker setup with the changes from main (including #26) and bumped into a similar issue as here, meaning that I was not able to see the patient creation in the OpenHIM Admin Console.

Is the config up-to-date to the one in main? Are you able to reproduce the subscription flow locally by using this branch?

samuelimoisili commented 1 year ago

@andrablaj I have updated the branch with the current config from main but I'm still getting the same issue. @njogz Can you help me out with this? Thanks.

samuelimoisili commented 1 year ago

@njogz and @andrablaj It was an endpoint configuration issue. I've updated the endpoints in the following configuration files mediator/config.ts, cht-config/app_settings.json and cht-config/src/controllers/service-request.ts.

njogz commented 1 year ago

@samuelimoisili I was also able to get the whole workflow to work. Great job!