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

Registration problem #232

Open
bing-10 opened this issue Jun 28, 2023 · 20 comments
Open

Registration problem #232

bing-10 opened this issue Jun 28, 2023 · 20 comments

Comments

@bing-10
Copy link

bing-10 commented Jun 28, 2023

image
After deploying through docker compose, I start test the client by register a new account. However, here comes the problem (400 bad request), is it due to my wrong configuration?

@Suleman-Elahi
Copy link

show the compos file you are using and the platform you are deploying it .....

@bing-10
Copy link
Author

bing-10 commented Jul 3, 2023

I just modified the SERVER_DOMAIN and APP_DOMAIN:
image
image

@Suleman-Elahi
Copy link

If you are using Google Cloud or AWS then have you allowed those ports through the firewall?

@bing-10
Copy link
Author

bing-10 commented Jul 3, 2023

I am using AWS and I can get access to the admin page like this:
image
but the problem occurs in the client

@ilovefreesw
Copy link

ilovefreesw commented Jul 3, 2023

Try using the default SQLite database. You are using Postgres. If SQLite works, then you need to change localhost to internal IP address of the host machine.

Or, you can also use host.docker.internal instead of localhost.

postgres://postgres:[email protected]:49153/chatgpt

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

I have left the postgres configuration commented to take the SQLite as default. Should I configure it explicitly?
image

@Suleman-Elahi
Copy link

Is it working now ?

The problem with your setup is that you are using the localhost. That will not work.

Set DB_URL to what @ilovefreesw mentioned above.

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

I set this but still got the error:
image

image

@Suleman-Elahi
Copy link

That's strange .. post the log of docker-compose up command.

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

image
image
image
image
image
image

@Suleman-Elahi
Copy link

Yes, it is the problem with the Postgres srever name. I think you are using older version of Docker. Whatever the OS is this, find its IP address.

Tell me the output of ip addr show command.

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

image

@Suleman-Elahi
Copy link

Then use this as the DB_URL = postgres://postgres:[email protected]:49153/chatgpt

And if it still doesn't work then create a new EC2 instance with Ubuntu 22.04 or Ubuntu 20.04 image.

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

I tried this, but the problem remains unresolved.

@Suleman-Elahi
Copy link

Did it work when you used the default SQLite database?

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

As for creating a new EC2 instance, I have not tried. Could you please give me some more detailed instructions? Thank you.

@Suleman-Elahi
Copy link

Where are you using it right now ? on Which cloud provider and operating system?

@Suleman-Elahi
Copy link

Suleman-Elahi commented Jul 4, 2023

Follow this tutorial: I think this is the same. https://www.youtube.com/watch?v=VKDU10gbYVQ

But it uses DigitalOcean ..so chnage that for yourself..of if you can afford DO then follow this tutorial.

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

AWS, Ubuntu-22.04.1

@bing-10
Copy link
Author

bing-10 commented Jul 4, 2023

Follow this tutorial: I think this is the same. https://www.youtube.com/watch?v=VKDU10gbYVQ

But it uses DigitalOcean ..so chnage that for yourself..of if you can afford DO then follow this tutorial.

Thank you, I'll take it as a reference.

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

3 participants