full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
Bad Gateway returned
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
The logs are
-
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"
-
proxy-1 | time="2024-03-13T20:09:51Z" level=error msg="the router fastapi-project-frontend-https@docker uses a non-existent resolver: le"
post more info on your system, your hosts file, and your .env. Make sure 127.0.0.1 is mapped to localhost.
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.
what @openSourceBugs said ^^^
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
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