hi ryan, thanks for your responses. I got it working. Not sure what I did, but I just added an nginx reverse proxy in the front and forwarded port 1337-> 5000 and was able to access the website publicly.
dockerized webapp not publicly accessible from azure VM ubuntu
Hi,
I have opened ports on the Azure portal as well as inside the vm but I'm still not able to access the webapp which works locally on my laptop. I tried the following suggestions:
1) opening ports within the VM: bl1adv_firewallportopenexamples.htm
2) setting inbound rules in Azure portal: windows-azure-virtual-machine-opening-a-port
Here is the output of the docker-compose up
command
Starting OpenBSD Secure Shell server: sshd.
pyapi | [2021-01-06 16:19:36 -0800] [1] [INFO] Starting gunicorn 20.0.4
pyapi | [2021-01-06 16:19:36 -0800] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
pyapi | [2021-01-06 16:19:36 -0800] [1] [INFO] Using worker: sync
pyapi | [2021-01-06 16:19:36 -0800] [8] [INFO] Booting worker with pid: 8
When I type in my browser: {PUBLIC_VM_IP}:5000
I get a, 'cannot be reached' error. But my webapp still does not show up. Please provide assistance. Thanks
2 answers
Sort by: Most helpful
-
-
Ryan Hill 25,981 Reputation points Microsoft Employee
2021-01-07T16:11:52.907+00:00 If I'm understanding correctly @Spencer Trinh , you have an Ubuntu VM that's running docker image that contains your python web app. Rather than accessing on port 5000, your docker-compose should bind 5000 to 80
ports: - 5000:80
so the VM can route traffic on 80 to your docker web app.Regards,
Ryan