Public Repository

Last pushed: 2 years ago
Short Description
Docker Flask Python ToDo application template with MongoDB, Nignx and Apache HTTP Server.
Full Description

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 & 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

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

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

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
Docker Pull Command
Owner
dchq

Comments (0)