openthc / docker

8 stars 1 forks source link

Unable to login after docker install #4

Closed leomazzo1978 closed 1 year ago

leomazzo1978 commented 1 year ago

Hi,

I am running docker on an Azure VM Ubuntu 22.04.06 LTS Docker version 24.0.2, build cb74dfc docker-compose version 1.29.2, build 5becea4c

After install using docker compose, all containers are running:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3006ec11977f openthc/cre:latest "/openthc-cre" 41 minutes ago Up 5 seconds 0.0.0.0:4205->80/tcp cre 1c9c41cacae1 openthc/pos:latest "/openthc-pos" 41 minutes ago Up 4 seconds 0.0.0.0:4204->80/tcp pos 43d1ca631acf openthc/app:latest "/openthc-app" 41 minutes ago Up 4 seconds 0.0.0.0:4202->80/tcp app 465d616e4c3e openthc/lab:latest "/openthc-lab" 41 minutes ago Up 3 seconds 0.0.0.0:4203->80/tcp lab 2d5166020cf4 openthc/sql:latest "docker-entrypoint.s…" 41 minutes ago Up 3 seconds 127.0.0.1:42095->5432/tcp sql0 d856924c0941 redis "docker-entrypoint.s…" 41 minutes ago Up 2 seconds 6379/tcp redis

This VM on Azure has a Public IP, so i am trying to login using http://public_ip:4202

The command was executed with success: root@vm-poc-openthc:/opt/openthc/docker# docker-compose exec app php ./sbin/first-time.php string(26) "XXXXXXXXXXXXXXXXXXX"

I can access the login page:

Screen Shot 2023-06-15 at 00 09 00

But using the default user root@openthc.local with password password, i cannot able to login. The same screen loads again without message error about wrong user or password.

When i try to create a new account, the page redirects to localhost on port 4201, but no docker container running on 4201.

Screen Shot 2023-06-15 at 00 13 05

Regards. Leonardo.

mashiox commented 1 year ago

Hi Leonardo,

Thank you for opening an issue.

I'll try to segment my response to the main points of your concerns:

Login

Unfortunately, I can not reproduce the behavior you describe failing to log-in to the application environment running in a docker container on my local machine.

In the following scenario, I have made no modifications to first-time.php or any configuration file the gfs/ directory.

Did your environment have modifications to these files? If so, please attempt the steps without changes.

Sign-Up / Create an Account

The problem you are running into is that the SSO service responsible for creating user accounts was intentionally left out of the docker environment. This is because it was not necessary to make a minimal environment work.

We are working on giving folks a better way to create accounts, it is taking some time. You can copy the first-time.php to another file, and make changes so that it creates a user with the username and credentials you wish. While we continue to troubleshoot the Login issue, let's commit to using the default credentials.

leomazzo1978 commented 1 year ago

Hi Team,

Now i am able to login on app

I have configure apache2 with reverse proxy to container. It’s working:

Screen Shot 2023-06-15 at 23 06 27

But, when I am trying to create a register as a new SECTION, for example, I have the msg error below:

Screen Shot 2023-06-15 at 23 07 18

Could you help us ?

Regards., Leonardo.

From: Matthew Walther @.> Date: Thursday, 15 June 2023 13:59 To: openthc/docker @.> Cc: Consultoria Evercloud @.>, Author @.> Subject: Re: [openthc/docker] Unable to login after docker install (Issue #4)

Hi Leonardo,

Thank you for opening an issue.

I'll try to segment my response to the main points of your concerns:

Login

Unfortunately, I can not reproduce the behavior you describe failing to log-in to the application environment running in a docker container on my local machine.

In the following scenario, I have made no modifications to first-time.php or any configuration file the gfs/ directory.

Did your environment have modifications to these files? If so, please attempt the steps without changes.

Sign-Up / Create an Account

The problem you are running into is that the SSOhttps://github.com/openthc/sso service responsible for creating user accounts was intentionally left out of the docker environment. This is because it was not necessary to make a minimal environment work.

We are working on giving folks a better way to create accounts, it is taking some time. You can copy the first-time.php to another file, and make changes so that it creates a user with the username and credentials you wish. While we continue to troubleshoot the Login issue, let's commit to using the default credentials.

— Reply to this email directly, view it on GitHubhttps://github.com/openthc/docker/issues/4#issuecomment-1593427244, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BASWDOCAJRKRS5FLRU33F6DXLM5OLANCNFSM6AAAAAAZHG42QU. You are receiving this because you authored the thread.Message ID: @.***>

mashiox commented 1 year ago

Hey Leonardo,

Just wanted to let you know we received your updated notes, and wanted to give you a quick update.

We identified a problem with the section create method and application configuration that is in alignment with your report. We will have an update and instructions on how to move forward soon.

Thank you for your support and patience.

leomazzo1978 commented 1 year ago

Hi,

Thank you for supporting us. We are trying to setup a dev environment in Azure.

Regards, Leonardo

leomazzo1978 commented 1 year ago

Hi,

Have any update ?

Regards., Leonaro.

mashiox commented 1 year ago

Sorry, no update.

leomazzo1978 commented 1 year ago

Hi Mashiox,

I can see the app.openthc.com have the same problem. There is any workaround for this ?

Regards.,

mashiox commented 1 year ago

Leonardo,

The problem you are experiencing in our commercial service is not the same problem you are experiencing in your local docker environment.

The problem you are experiencing in our commercial service is because we do not have a License that is owned by your Company in public Directory service, and this is blocking the onboard workflow. Please keep in mind, this is not the support channel for our commercial services.

The problem you are experiencing in your local docker environment, is because the application out-of-the-box is mis-configured. This happened because we made to some of our upstream libraries that breaks the initial experience in the docker environment.

Our team has awareness of this problem and we are tracking it, but we have a lot of other work prioritized at this time of writing.

Here is a high-level overview of the missing and misconfigured components you may have:

You need to configure these files:

gfs/app-config.php values for keys:

gfs/cre-config.php values for keys:

Additionally, the App service contains a secondary configuration that is required for the "cre-adapter" library.

Because a hypothetical Brazilian environment would use the default configuration found in vendor/cre-adapter/etc/cre/bra.yaml

We can add the missing CRE configuration to App in the file-path /opt/openthc/app/etc/cre/bra.yaml

server: "https://cre/"
service: "cre"
service-id: "{your value for `openthc/app/id`}"
service-sk: "{your value for`openthc/cre/secret`}"
leomazzo1978 commented 1 year ago

Hi Matthew,

Thank you for replying. So, i have interesting to implement the OpenTHC to support Brazilian users. Could you give me the commercial contact ?

Regards., Leonardo.

From: Matthew Walther @.> Date: Wednesday, 5 July 2023 18:26 To: openthc/docker @.> Cc: Consultoria Evercloud @.>, Author @.> Subject: Re: [openthc/docker] Unable to login after docker install (Issue #4)

Leonardo,

The problem you are experiencing in our commercial service is not the same problem you are experiencing in your local docker environment.

The problem you are experiencing in our commercial service is because we do not have a License that is owned by your Company in public Directory service, and this is blocking the onboard workflow. Please keep in mind, this is not the support channel for our commercial services.

The problem you are experiencing in your local docker environment, is because the application out-of-the-box is mis-configured. This happened because we made to some of our upstream libraries that breaks the initial experience in the docker environment.

Our team has awareness of this problem and we are tracking it, but we have a lot of other work prioritized at this time of writing.

Here is a high-level overview of the missing and misconfigured components you may have:

You need to configure these files:

gfs/app-config.php values for keys:

gfs/cre-config.php values for keys:

Additionally, the App service contains a secondary configuration that is required for the "cre-adapter"https://github.com/openthc/cre-adapter library.

Because a hypothetical Brazilian environment would use the default configuration found in vendor/cre-adapter/etc/cre/bra.yamlhttps://github.com/openthc/cre-adapter/blob/master/etc/cre/bra.yaml

We can add the missing CRE configuration to App in the file-path /opt/openthc/app/etc/cre/bra.yaml

server: "https://cre/"

service: "cre"

service-id: "{your value for openthc/app/id}"

service-sk: "{your value foropenthc/cre/secret}"

— Reply to this email directly, view it on GitHubhttps://github.com/openthc/docker/issues/4#issuecomment-1622539094, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BASWDOEUWMXAK4D2A4KVYN3XOXLXRANCNFSM6AAAAAAZHG42QU. You are receiving this because you authored the thread.Message ID: @.***>

mashiox commented 1 year ago

Our commercial contact information can be found on our website.

I would be willing to help you begin the discussion between our teams. You can contact me at mbw@openthc.com, and we can set up a 30 minute meeting time next week. (Jul 17-21)

We receive a fair amount of meeting requests from entrepreneurs looking for consulting. To help us better build alignment with you: please draft a meeting agenda of topics and questions that you want more information on. Send that to me with your preferred meeting time, and I will invite folks from the OpenTHC team.

Closing to continue this discussion via email.