full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

Bad Gateway returned

Open camilotabaresj opened this issue 11 months ago • 5 comments

I'm trying to run the full project using pipx and docker-compose. But when i try to get in the frontend path http://localhost/login it returns Bad Gateway Screenshot 2024-03-13 at 3 01 09 PM

The logs are

  1. proxy-1 | time="2024-03-13T20:01:03Z" level=debug msg="'502 Bad Gateway' caused by: dial tcp 172.25.0.2:80: connect: connection refused"
  2. proxy-1 | time="2024-03-13T20:09:51Z" level=error msg="the router fastapi-project-frontend-https@docker uses a non-existent resolver: le"

camilotabaresj avatar Mar 13 '24 20:03 camilotabaresj

post more info on your system, your hosts file, and your .env. Make sure 127.0.0.1 is mapped to localhost.

heiqs avatar Mar 23 '24 11:03 heiqs

This has been an ongoing issue for at least 2 months with multiple people posting that this is a problem. The front end is requesting https login and the backend is responding with a bad gateway. None of the responses have been helpful so far such as "clone an earlier branch" "post more info" "rebuild everything in docker". It's a configuration issue somewhere with https but no one seems to know what the issue is.

openSourceBugs avatar Apr 19 '24 04:04 openSourceBugs

what @openSourceBugs said ^^^

JacobFV avatar Apr 29 '24 08:04 JacobFV

This has been an ongoing issue for at least 2 months with multiple people posting that this is a problem. The front end is requesting https login and the backend is responding with a bad gateway. None of the responses have been helpful so far such as "clone an earlier branch" "post more info" "rebuild everything in docker". It's a configuration issue somewhere with https but no one seems to know what the issue is.

It is a client-side misconfiguration. Previously in the logs, the backend service shows:

backend-1   |   Value error, The value of SECRET_KEY is "changethis", for security, please change it, at least for deployments. [type=value_error, input_value={'SECRET_KEY': 'changethi...N_REGISTRATION': 'True'}, input_type=dict]

So it is mandatory to configure a non-default SECRET_KEY

tomeli5n avatar May 17 '24 00:05 tomeli5n

Actually it is an issue in the network config of the proxy service that has already been fixed on master but have yet to be released. https://github.com/tiangolo/full-stack-fastapi-template/pull/1184

jb-delafosse avatar Jul 15 '24 21:07 jb-delafosse