Docker Flask Python ToDo application template with MongoDB. Also avialable with Docker Nignx and Apache HTTP Server for load balancing and reverse proxy. Deploy and manage the 3 application templates in this project on vSphere, OpenStack, Amazon EC2, Rackspace, Microsoft Azure, Google Compute Engine, DigitalOcean, IBM SoftLayer and many other cl…
Python HTML
Permalink
Failed to load latest commit information.
templates
Dockerfile
README.md
app.py
requirements.txt

README.md

To run & manage this simple Docker Python "ToDo" application on 18 different clouds and virtualization platforms (including vSphere, OpenStack, AWS, Rackspace, Microsoft Azure, Google Compute Engine, DigitalOcean, IBM SoftLayer, etc.), make sure that you either:

Customize and Run

Customize & Run all the published Docker Python application templates and many other templates (including multi-tier Java application stacks, Node.js, Ruby, PHP, Mongo Replica Set Cluster, Drupal, Wordpress, MEAN.JS, etc.)

Python with MongoDB - ToDo App

Customize and Run

web:
  image: dchq/docker-python:latest
  command: python -u app.py
  host: host1
  ports:
    - 5000:5000
  environment:
    - MONGO_IP={{db|container_hostname}}
  plugins:
    - !plugin
      # This plugin injects the Mongo IP into app.py
      lifecycle: on_create
      id: FemTq
      arguments:
        - MONGO_IP={{db|container_hostname}}
db:
  image: mongo:3.0.2
  host: host1

Nginx-Python-MongoDB - ToDo App

Customize and Run

nginx:
  image: nginx:latest
  publish_all: true
  mem_min: 50m
  host: host1
  plugins:
    - !plugin
      id: 0H1Nk
      restart: true
      lifecycle: on_create, post_scale_out:web, post_scale_in:web, post_stop:web, post_start:web
      arguments:
        # Use container_private_ip if you're using Docker networking
        - servers=server {{web | container_private_ip}}:5000;
        # Use container_hostname if you're using Weave networking
        #- servers=server {{web | container_hostname}}:5000;
web:
  image: dchq/docker-python:latest
  cluster_size: 1
  host: host1
  command: python -u app.py
  environment:
    - MONGO_IP={{db|container_hostname}}
  plugins:
    - !plugin
      # This plugin injects the Mongo IP into app.py
      lifecycle: on_create
      id: FemTq
      arguments:
        - MONGO_IP={{db|container_hostname}}
db:
  image: mongo:3.0.2
  host: host1

ApacheHTTP-Python-MongoDB - ToDo App

Customize and Run

HTTP-LB:
  image: httpd:latest
  publish_all: true
  mem_min: 50m
  host: host1
  plugins:
    - !plugin
      id: uazUi
      restart: true
      lifecycle: on_create, post_scale_out:web, post_scale_in:web
      arguments:
        # Use container_private_ip if you're using Docker networking
        - BalancerMembers=BalancerMember http://{{web | container_private_ip}}:5000
        # Use container_hostname if you're using Weave networking
        #- BalancerMembers=BalancerMember http://{{web | container_hostname}}:5000
web:
  image: dchq/docker-python:latest
  cluster_size: 1
  host: host1
  command: python -u app.py
  environment:
    - MONGO_IP={{db|container_hostname}}
  plugins:
    - !plugin
      # This plugin injects the Mongo IP into app.py
      lifecycle: on_create
      id: FemTq
      arguments:
        - MONGO_IP={{db|container_hostname}}
db:
  image: mongo:3.0.2
  host: host1