testdrivenio/flask-on-docker

How can I see web at 80 port in production?

nicehorse06 opened this issue · 3 comments

Hi

in production, http://localhost:1337 is from gunicorn

but how can I know where is nginx work?

it's not work at 80 port in my computer

thanks

Can you try to rephrase your question. I'm not understanding it.

Sorry I misunderstood it.
I didn't really understand Nginx and docker-compose.prod,tml.
So I thought Nginx only work on 80 port, so is Nginx on docker,
and maybe 1337:80 mean gunicorn 1337 port to Nginx on docker outside 80 port.

Now I know 1337:80 means Nginx inside docker 80 port to dokcer outside 1337port.

And I want to ask other questions, about I want to deploy the project on GCP linux VM

  1. which is better deploy way?
  • Use git to download the project, and run docker-compose -f docker-compose.prod.yml up -d --build
    or
  • upload web, nginx, db image to docker hub, then docker pull on the VM, then run
  1. When I use Flask url_for(), the URL always miss port 1337 on host:1337,so I add :1337 on nginx.conf, become proxy_set_header Host $host:1337;
    Does there have more graceful way to add the port 1337?

  2. When I develop the project, should I use env and server run by manage run or use docker-compose up -d --build to run the project?
    I not sure docker project is deploy on docker or after developing is already on docker.

Thank your response and your tutorial is awesome
Let me have first own docker project : )

These questions are more appropriate for StackOverflow. GitHub issues are not meant for support like this. Closing this issue.