version: '3'

# Reconfigures the default docker-compose.yml to replace Kafka/Zookeeper by RabbitMQ
# Usage: docker-compose -f ./docker-compose.yml -f ./docker-compose-postgres.yml up
services:

  kafka:
    entrypoint: ["echo", "kafka service is disabled"]

  zookeeper:
    entrypoint: ["echo", "zookeeper service is disabled"]

  rabbitmq:
    image: rabbitmq:3.7
    container_name: dataflow-rabbitmq
    expose:
      - '5672'

  dataflow-server:
    environment:
      - spring.cloud.dataflow.applicationProperties.stream.spring.rabbitmq.host=rabbitmq

  app-import:
    command: >
      /bin/sh -c "
        ./wait-for-it.sh -t 180 dataflow-server:9393;
        wget -qO- 'http://dataflow-server:9393/apps' --post-data='uri=${STREAM_APPS_URI:-https://dataflow.spring.io/rabbitmq-maven-latest&force=true}';
        echo 'Stream apps imported'
        wget -qO- 'http://dataflow-server:9393/apps' --post-data='uri=${TASK_APPS_URI:-https://dataflow.spring.io/task-maven-latest&force=true}';
        echo 'Task apps imported'"


version: '3'

# Reconfigures the default docker-compose.yml to replace Kafka/Zookeeper by RabbitMQ
# Usage: docker-compose -f ./docker-compose.yml -f ./docker-compose-postgres.yml up
services:

  kafka-broker:
    entrypoint: ["echo", "kafka-broker service is disabled"]

  zookeeper:
    entrypoint: ["echo", "zookeeper service is disabled"]

  rabbitmq:
    image: rabbitmq:3.7
    container_name: dataflow-rabbitmq
    expose:
      - '5672'

  dataflow-server:
    environment:
      - spring.cloud.dataflow.applicationProperties.stream.spring.rabbitmq.host=rabbitmq

  app-import:
    command: >
      /bin/sh -c "
        ./wait-for-it.sh -t 180 dataflow-server:9393;
        wget -qO- 'http://dataflow-server:9393/apps' --post-data='uri=${STREAM_APPS_URI:-https://dataflow.spring.io/rabbitmq-maven-latest&force=true}';
        echo 'Stream apps imported'
        wget -qO- 'http://dataflow-server:9393/apps' --post-data='uri=${TASK_APPS_URI:-https://dataflow.spring.io/task-maven-latest&force=true}';
        echo 'Task apps imported'"


Fix docker-compose kafka-borker service name
Fix docker-compose kafka-borker service name
