version: '2'

services:
    zookeeper:
        image: 31z4/zookeeper:3.4.8
        restart: always

    storm-nimbus:
        image: 31z4/storm:$STORM_VERSION
        restart: always
        command: >
            storm nimbus
            -c storm.zookeeper.servers="[\"zookeeper\"]"
            -c nimbus.host="storm-nimbus"
        depends_on:
            - zookeeper

    storm-supervisor:
        image: 31z4/storm:$STORM_VERSION
        restart: always
        command: >
            storm supervisor
            -c storm.zookeeper.servers="[\"zookeeper\"]"
            -c nimbus.seeds="[\"storm-nimbus\"]"
        depends_on:
            - storm-nimbus

    storm-ui:
        image: 31z4/storm:$STORM_VERSION
        restart: always
        command: >
            storm ui
            -c nimbus.host="storm-nimbus"
        ports:
            - 8080:8080
        depends_on:
            - storm-supervisor
            - storm-nimbus

    test:
        build:
            context: ..
            dockerfile: tests/Dockerfile-$PYTHON_VERSION
        environment:
            STORM_UI_HOST: storm-ui
        depends_on:
            - storm-ui

version: '2'

services:
    zookeeper:
        image: zookeeper:3.4
        restart: always

    storm-nimbus:
        image: 31z4/storm:$STORM_VERSION
        restart: always
        command: >
            storm nimbus
            -c storm.zookeeper.servers="[\"zookeeper\"]"
            -c nimbus.host="storm-nimbus"
        depends_on:
            - zookeeper

    storm-supervisor:
        image: 31z4/storm:$STORM_VERSION
        restart: always
        command: >
            storm supervisor
            -c storm.zookeeper.servers="[\"zookeeper\"]"
            -c nimbus.seeds="[\"storm-nimbus\"]"
        depends_on:
            - storm-nimbus

    storm-ui:
        image: 31z4/storm:$STORM_VERSION
        restart: always
        command: >
            storm ui
            -c nimbus.host="storm-nimbus"
        ports:
            - 8080:8080
        depends_on:
            - storm-supervisor
            - storm-nimbus

    test:
        build:
            context: ..
            dockerfile: tests/Dockerfile-$PYTHON_VERSION
        environment:
            STORM_UI_HOST: storm-ui
        depends_on:
            - storm-ui

Use an official Zookepeer image
Use an official Zookepeer image
