How to make Flask in a Docker Container my main web site with NGINX
I followed the instructions here. https://www.digitalocean.com/community/tutorials/how-to-build-and-deploy-a-flask-application-using-docker-on-ubuntu-18-04 I’m trying to get my website to use NGINX and have a Docker Container serving my Flask Application. It is working, but it is on port 56733. I’m trying to have the Flask App served whenever anyone visits my web page. Could I just change the code below from start.sh
#!/bin/bash
app="docker.test"
docker build -t ${app} .
docker run -d -p **56733**:80 \
--name=${app} \
-v $PWD:/app ${app}
to
#!/bin/bash
app="docker.test"
docker build -t ${app} .
docker run -d -p **80**:80 \
--name=${app} \
-v $PWD:/app ${app}
I’m a noob at this and am doing this to learn more about Docker, Flask and NGINX. If anyone has any resources which explain NGINX well or deploying Docker on NGINX that would be greatly appreciated. I’ve been googling, but haven’t found the resources I’ve locate very helpful.
#!/bin/bash
app="docker.test"
docker build -t ${app} .
docker run -d -p **56733**:80 \
--name=${app} \
-v $PWD:/app ${app}
to
#!/bin/bash
app="docker.test"
docker build -t ${app} .
docker run -d -p **80**:80 \
--name=${app} \
-v $PWD:/app ${app}
I’m a noob at this and am doing this to learn more about Docker, Flask and NGINX. If anyone has any resources which explain NGINX well or deploying Docker on NGINX that would be greatly appreciated. I’ve been googling, but haven’t found the resources I’ve locate very helpful.