A Dockerized Flask application backed with Gunicorn and Nginx.
The Dockerfile image allows you to run a movie quote generator Flask application in Python that runs with Gunicorn and Nginx in a single container.
Flask app with Gunicorn and Nginx contains a detailed explanation of steps on how to setup a Flask web application with Gunicorn and Nginx.
Prerequisites:
- Docker >= 19.03.13
To install Docker Engine follow steps given in Install Docker Engine.
To build the project from scratch:
- Clone the project locally
git clone https://github.com/kevalnagda/movieapp.git
- Go to the project directory
cd movieapp
- Build Docker image from the Dockerfile
docker build -t moviequotesapp .
- Run a Docker container based on the image you just created
docker run moviequotesapp
- Visit
http://<container_ip_address>:80
.container_ip_address
is usually172.17.0.2
. Else you can check it by executingdocker inspect <container id> | grep "IPAddress"
.
To run project from the Docker image:
- Pull the Docker image locally
docker pull kevalnagda/movieapp
- Run a Docker container based on the image you just pulled
docker run kevalnagda/movieapp
- Visit
http://<container_ip_address>:80
.container_ip_address
is usually172.17.0.2
. Else you can check it by executingdocker inspect <container id> | grep "IPAddress"
.
The runnning application should look like: