Skip to content

Tutorial on orchestrating docker compose service for flask application, initialized with gunicorn. And nginx is used to expose the docker-compose service.

License

Notifications You must be signed in to change notification settings

mdsa3d/Tutorial-flask_gunicorn_nginx_docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose Tutorial (Flask + Gunicorn + Nginx)

GitHub GitHub Workflow Status (branch)

This repository shows a simple demonstration of configuring docker compose service for flask application running on WSGI server (Gunicorn) and exposed using nginx as reverse proxy web server.

Test flask app

To test the flask application, open the terminal and go to the app directory and run wsgi.py file.

cd ~/app
gunicorn -w 1 -b 0.0.0.0:8000 wsgi:app

A WSGI server will be initialized at http://localhost:8000

Run docker compose

This tool will allow us to start multiple containers with single command. To initiate the containers run following command:

Linux (Ubuntu) sudo docker-compose up --build

Windows docker compose up --build

This should start your application at http://localhost:80.

About

Tutorial on orchestrating docker compose service for flask application, initialized with gunicorn. And nginx is used to expose the docker-compose service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published