Browse Source

Added docker-compose.yml

Elisey Zanko 9 years ago
parent
commit
32a1b5dc48
2 changed files with 25 additions and 0 deletions
  1. 4 0
      storm/content.md
  2. 21 0
      storm/docker-compose.yml

+ 4 - 0
storm/content.md

@@ -34,6 +34,10 @@ Assuming you have `storm-starter-topologies-1.0.0.jar` in the current directory.
 
 		$ docker run -it --net container:nimbus -v $(pwd)/storm-starter-topologies-1.0.0.jar:/topology.jar 31z4/storm:1.0.0 jar /topology.jar org.apache.storm.starter.WordCountTopology topology
 
+## %%COMPOSE%%
+
+Run `docker-compose up` and wait for it to initialize completely. The Nimbus will be available at your host and port `6627`.
+
 ## Configuration
 
 This image uses [default configuration](https://github.com/apache/storm/blob/v1.0.0/conf/defaults.yaml) of the Apache Storm. There are two main ways to change it.

+ 21 - 0
storm/docker-compose.yml

@@ -0,0 +1,21 @@
+version: '2'
+services:
+    zookeeper:
+        image: jplock/zookeeper:3.4.8
+        restart: always
+
+    nimbus:
+        image: 31z4/storm:1.0.0
+        command: nimbus -c storm.zookeeper.servers="[\"zookeeper\"]" -c nimbus.host="nimbus"
+        depends_on:
+            - zookeeper
+        restart: always
+        ports:
+            - 6627:6627
+
+    supervisor:
+        image: 31z4/storm:1.0.0
+        command: supervisor -c storm.zookeeper.servers="[\"zookeeper\"]" -c nimbus.host="nimbus"
+        depends_on:
+            - nimbus
+        restart: always