1

I am trying to run a flask application on GCP cloudrun and in dockerfile i am confused if i should use gunicorn with nginx or just gunicorn alone. My cloudrun will be a backend to external HTTPS classic load balancer so if it supports reverse proxy i can just run docker image with gunicron. Does someone have idea i can see in few blogs it supports proxy but is this the same thing that nginx does? I can’t find any reference for dockerfile with nginx and gunicorn its all docker-compose and in my project we should only use dockerfile and it would be build by a tool.

Reference

  • 1
    Load balancers are reverse proxies. The choice of using Nginx in front of containers is not a simple choice. Container Optimized OS is an official Google container platform that does not use a reverse proxy (Nginx or similar) for public-facing access. Cloud Run also has its own load balancing system in front of containers which negates requiring Nginx or similar. The simple answer is Nginx is not required. A secure production answer requires analyzing your application. – John Hanley Apr 05 '23 at 14:34
  • Thanks for the answer. Well if it uses reverse proxy then i feel all good to use just gunicorn. We have cloud armor and other policies for security. – sidharth vijayakumar Apr 05 '23 at 17:59

0 Answers0