The proxy_pass directive takes as argument the url to which we are proxying. In our case we will alias our flask container in the docker network as flask-app. This makes our flask app accessible at flask-app:5000/ from inside the nginx container.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello,
I follow your example and when I start the docker-compose at the end of your guide (with the configuration of the proxy pass) I have the error :
2020/03/04 15:33:50 [emerg] 1#1: host not found in upstream "flask-app" in /etc/nginx/conf.d/default.conf:6
nginx: [emerg] host not found in upstream "flask-app" in /etc/nginx/conf.d/default.conf:6
I checked and all my files are like your example.
Any ideas ??
Thanks !
Also did you forget adding alias?
Can I look at your sample code, is available in some repo?
As I mention in point 4