You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The other day I created a standalone docker container with Gunicorn serving a Flask app. Everything worked fine.
Yesterday, I created a docker-compose file to run all the containers including Nginx and now the same command fails to start the Gunicorn process properly. I cant even serve the application directly when I expose the Gunicorn port 8000.
When I navigate to localhost:8000 I get nothing rendered. And then when i navigate to localhost:8080 I get a 504 error.
Thanks for the help!
EDIT
Ok, so after three days of bashing my head, I re-started from the ground up. Rebuilt the app container and ran gunicorn.
From there I was able to determine that the gunicorn process was timing out because the database host name was incorrect. Instead of the an error being returned through my application, the failure went silent.
I fixed this by linking the postgres container and the web container. In my code I was able to use "postgres" (the name of the container) as the postgres host name.
Check the addresses to your external hosts.
The text was updated successfully, but these errors were encountered:
The other day I created a standalone docker container with Gunicorn serving a Flask app. Everything worked fine.
Yesterday, I created a docker-compose file to run all the containers including Nginx and now the same command fails to start the Gunicorn process properly. I cant even serve the application directly when I expose the Gunicorn port 8000.
Here is the docker-compose.yml:
The errors I get in my terminal are
Any idea why this might be happening?
When I navigate to localhost:8000 I get nothing rendered. And then when i navigate to localhost:8080 I get a 504 error.
Thanks for the help!
EDIT
Ok, so after three days of bashing my head, I re-started from the ground up. Rebuilt the app container and ran gunicorn.
From there I was able to determine that the gunicorn process was timing out because the database host name was incorrect. Instead of the an error being returned through my application, the failure went silent.
I fixed this by linking the postgres container and the web container. In my code I was able to use "postgres" (the name of the container) as the postgres host name.
Check the addresses to your external hosts.
The text was updated successfully, but these errors were encountered: