# Initial docker-compose file to run Exchange services in containers
# Phase1: Run NSQ in containers
# Phase2: Define Exchange services in this file.
version: '3'
services:
  nsqlookupd:
    image: nsqio/nsq
    command: /nsqlookupd
    ports:
      - "4161:4161"
      - "4160:4160"
    volumes:
      - ./docker/nsq/nsq.config:/etc/nsq.config:ro
  nsqd:
    image: nsqio/nsq
    command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --data-path=/nsq_data -broadcast-address=nsq --msg-timeout "60m0s" --max-msg-timeout "180m0s" --max-msg-size "31457280" -mem-queue-size 0
    depends_on:
      - nsqlookupd
    ports:
      - "4150:4150"
      - "4151:4251"
    volumes:
      - ./docker/nsq/nsq.config:/etc/nsq.config:ro
      - ./docker/nsq/:/nsq_data
  nsqadmin:
    image: nsqio/nsq
    command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
    depends_on:
      - nsqlookupd
    ports:
      - "4171:4171"

# Initial docker-compose file to run Exchange services in containers
# Phase1: Run NSQ in containers
# Phase2: Define Exchange services in this file.
version: '3'
services:
  nsqlookupd:
    image: nsqio/nsq
    command: /nsqlookupd
    ports:
      - "4161:4161"
      - "4160:4160"
    volumes:
      - ./docker/nsq/nsq.config:/etc/nsq.config:ro
  nsqd:
    image: nsqio/nsq
    command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --data-path=/nsq_data -broadcast-address=nsq --msg-timeout=${msg_timeout} --max-msg-timeout=${max_msg_timeout} --max-msg-size=${max_msg_size} -mem-queue-size=${mem_queue_size}
    depends_on:
      - nsqlookupd
    ports:
      - "4150:4150"
      - "4151:4251"
    volumes:
      - ./docker/nsq/nsq.config:/etc/nsq.config:ro
      - ./docker/nsq/:/nsq_data
  nsqadmin:
    image: nsqio/nsq
    command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
    depends_on:
      - nsqlookupd
    ports:
      - "4171:4171"

Use env vars for nsqd params
Use env vars for nsqd params
