HUB
Sign inSign up
docker-python logo

dchq/docker-python

By dchq

•Updated almost 11 years ago

Docker Flask Python ToDo application template with MongoDB, Nignx and Apache HTTP Server.

Image
0

1.1K

dchq/docker-python repository overview

DCHQ

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
Tag summary
Recent tags
Content type
Image
Digest
Size
255.8 MB
Last updated
almost 11 years ago
docker pull dchq/docker-python:latest