Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.45 KB

File metadata and controls

31 lines (24 loc) · 1.45 KB

Deploy flask code in Docker Machines

I am sure you guys want to try docker, it pretty new thing in the market and developer are appreciating.

How to use

  1. Download docker package from their offical page.
  2. Will use docker-machine which require VirtualBox as prerequisite.
  3. Type docker-machine create -d virtualbox dev
  4. Follow instruction mention on console to export and eval variable and put in .bashrc
  5. Type docker-machine ls
      
         NAME   ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
         dev    *        virtualbox   Running   tcp://192.168.99.100:2376           v1.10.3
      
  1. Navigate to ops folder and type docker-compose up -d
  2. After successful build then type http://<docker-ip> for my case it's http://192.168.99.100
  3. Login to app machine of docker using docker exec -it <continerid> bash
  4. Navigate to app folder and type in python env type db.create_all()

Checklist

  • Create guincorn server and docker-compose.
  • Create nginx docker-compose.
  • Static js/css example in flask and server from nginx.
  • Flask Example of use of postgres.
  • Docker image of postgres and usage.

Issues:-

Feel free to raise it over here.