Sign inSign up

dchq/docker-rails

By dchq

Updated over 10 years ago

Docker Ruby on Rails"Starter Kit" application with Redis, Memcached, PostgreSQL and HTTP/Nginx.

Image
0

1.2K

dchq/docker-rails repository overview

DCHQ

To run & manage this simple Docker Rails"Starter Kit" 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 Ruby on Rails"Starter Kit" application templates and many other templates (including multi-tier Java application stacks, Node.js, Python, PHP, Mongo Replica Set Cluster, Drupal, Wordpress, MEAN.JS, etc.)

Ruby on Rails-Memcache-Redis-PostgreSQL

Customize and Run

ruby:
  image: dchq/docker-rails:latest
  mem_min: 700m
  publish_all: true
  host: host1
  command: bin/rails server --port 3000 --binding 0.0.0.0
  plugins:
    - !plugin
      id: wbIQn
      restart: true
  environment:
    - POSTGRES_IP={{postgres|container_hostname}}
    - POSTGRES_USER={{postgres|POSTGRES_USER}}
    - POSTGRES_PASSWORD={{postgres|POSTGRES_PASSWORD}}
    - POSTGRES_DB={{postgres|POSTGRES_DB}}
    - REDIS_IP={{redis|container_private_ip}}
redis:
  image: redis:latest
  mem_min: 200m
  host: host1
memcache:
  image: memcached:latest
  mem_min: 200m
  host: host1
postgres:
  image: postgres:latest
  mem_min: 400m
  host: host1
  environment:
    - POSTGRES_USER=postgres
    - POSTGRES_PASSWORD=postgres
    - POSTGRES_DB=starterkit_dev
Nginx-Ruby on Rails-Memcache-Redis-PostgreSQL

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:ruby, post_scale_in:ruby
      arguments:
        # Use container_private_ip if you're using Docker networking
        - servers=server {{ruby | container_private_ip}}:3000;
        # Use container_hostname if you're using Weave networking
        #- servers=server {{ruby | container_hostname}}:3000;
ruby:
  image: dchq/docker-rails:latest
  mem_min: 700m
  publish_all: false
  host: host1
  command: bin/rails server --port 3000 --binding 0.0.0.0
  plugins:
    - !plugin
      id: wbIQn
      restart: true
  environment:
    - POSTGRES_IP={{postgres|container_hostname}}
    - POSTGRES_USER={{postgres|POSTGRES_USER}}
    - POSTGRES_PASSWORD={{postgres|POSTGRES_PASSWORD}}
    - POSTGRES_DB={{postgres|POSTGRES_DB}}
    - REDIS_IP={{redis|container_private_ip}}
redis:
  image: redis:latest
  mem_min: 200m
  host: host1
memcache:
  image: memcached:latest
  mem_min: 200m
  host: host1
postgres:
  image: postgres:latest
  mem_min: 400m
  host: host1
  environment:
    - POSTGRES_USER=postgres
    - POSTGRES_PASSWORD=postgres
    - POSTGRES_DB=starterkit_dev
ApacheHTTP-Ruby on Rails-Memcache-Redis-PostgreSQL

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:ruby, post_scale_in:ruby
      arguments:
        # Use container_private_ip if you're using Docker networking
        - BalancerMembers=BalancerMember http://{{ruby | container_private_ip}}:3000
        # Use container_hostname if you're using Weave networking
        #- BalancerMembers=BalancerMember http://{{ruby | container_hostname}}:3000
ruby:
  image: dchq/docker-rails:latest
  mem_min: 700m
  host: host1
  publish_all: false
  command: bin/rails server --port 3000 --binding 0.0.0.0
  plugins:
    - !plugin
      id: wbIQn
      restart: true
  environment:
    - POSTGRES_IP={{postgres|container_hostname}}
    - POSTGRES_USER={{postgres|POSTGRES_USER}}
    - POSTGRES_PASSWORD={{postgres|POSTGRES_PASSWORD}}
    - POSTGRES_DB={{postgres|POSTGRES_DB}}
    - REDIS_IP={{redis|container_private_ip}}
redis:
  image: redis:latest
  mem_min: 200m
  host: host1
memcache:
  image: memcached:latest
  mem_min: 200m
  host: host1
postgres:
  image: postgres:latest
  mem_min: 400m
  host: host1
  environment:
    - POSTGRES_USER=postgres
    - POSTGRES_PASSWORD=postgres
    - POSTGRES_DB=starterkit_dev

Tag summary

Content type

Image

Digest

Size

461.6 MB

Last updated

over 10 years ago

docker pull dchq/docker-rails