Public Repository

Last pushed: 2 years ago
Short Description
Docker Nginx Consul Example - https://github.com/dchqinc/nginx-consul
Full Description

This is a Docker Service Discovery example. The image was built using this project.
https://github.com/dchqinc/docker-service-discovery

To run & manage this Docker Java application with Consul and Registrator 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 the published Docker Java application with Consul and Registrator and many other templates (including multi-tier Java application stacks, LAMP, LAPP, and LAOP Stacks, Mongo Replica Set Cluster, Drupal, Wordpress, MEAN.JS, etc.)

Multi-Tier Java (Consul-Nginx-Tomcat-Solr-Mongo)

Nginx:
  image: dchq/nginx-consul:latest
  publish_all: true
  mem_min: 50m
  host: host1
  plugins:
    - !plugin
      id: GINmu
      restart: true
      lifecycle: on_create
      arguments:
        - APPSERVER_IP={{AppServer | container_private_ip}}
        - SERVICE_NAME={{AppServer | SERVICE_NAME}}
        - SERVICE_TAGS={{AppServer | SERVICE_TAGS}}
        - CONSUL_IP={{Consul | container_private_ip}}

AppServer:
  image: tomcat:8.0.21-jre8
  mem_min: 600m
  host: host1
  cluster_size: 1
  environment:
    - mongo_url={{Mongo|container_private_ip}}:27017/dchq
    - solr_host={{Solr|container_private_ip}}
    - solr_port=8983
    - SERVICE_NAME=app
    - SERVICE_TAGS=production
  plugins:
    - !plugin
      id: oncXN
      restart: true
      arguments:
        - file_url=https://github.com/dchqinc/dchq-docker-java-solr-mongo-cassandra-example/raw/master/dbconnect.war
        - dir=/usr/local/tomcat/webapps/ROOT.war
        - delete_dir=/usr/local/tomcat/webapps/ROOT
Consul:
  image: progrium/consul:latest
  host: host1
  ports:
    - "8300:8300"
    - "8400:8400"
    - "8500:8500"
    - "8600:53/udp"  
  command: -server -bootstrap -advertise 10.0.2.15

Registrator:
  image: gliderlabs/registrator:latest
  host: host1
  command: consul://<HOST_IP>:8500
  volumes:
    - "/var/run/docker.sock:/tmp/docker.sock"

Solr:
  image: solr:latest
  mem_min: 300m
  host: host1
  publish_all: false
  plugins:
    - !plugin
      id: doX8s
      restart: true
      arguments:
        - file_url=https://github.com/dchqinc/dchq-docker-java-solr-mongo-cassandra-example/raw/master/names.zip
Mongo:
  image: mongo:latest
  host: host1
  mem_min: 400m
Docker Pull Command
Owner
dchq