Skip to content

Docker multi-container for Python Flask + MySQL + uWSGI + Nginx

Notifications You must be signed in to change notification settings

buckshotwhoami/docker-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask starter in a Docker multicontainer

Docker multi-container and flask skeleton with Flask + MySQL + uWSGI + Nginx

Starting

In order to make it work you need Docker & Docker Compose

Once you've your docker environment ready, clone this repo

git clone https://github.com/0x13a/docker-flask && cd docker-flask

Configuration

Well, now you have to configure your MySQL server credentials, port & address here in the docker-compose.yml

db:
    image: mysql
    ports:
        - 127.0.0.1:3306:3306
    networks:
        - appnet
    volumes:
        - "./.data/db:/var/lib/mysql"
    environment:
        MYSQL_ROOT_PASSWORD: changeThisSecretPasswordHere

You have to configure your project dependencies as well here in the src/requirements.txt eg.

Flask==0.8
Jinja2==2.6
requests==0.11.1

Usage

Build your docker multicontainer

docker-compose build

Run your docker multicontainer

docker-compose up -d

Now your Flask app is ready and running at http://localhost


Learn more at https://docs.docker.com/compose/

About

Docker multi-container for Python Flask + MySQL + uWSGI + Nginx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published