version: '3'
services:
  rabbitmq:
    image: rabbitmq:3
    container_name: oq-cluster-rabbitmq
    environment:
      - RABBITMQ_DEFAULT_VHOST=openquake 
      - RABBITMQ_DEFAULT_USER=openquake
      - RABBITMQ_DEFAULT_PASS=openquake
    networks:
      - oq-cluster-net
  master:
    build:
      context: .
      dockerfile: Dockerfile.master
    image: openquake/engine-master
    container_name: oq-cluster-master
    # Uncomment to enable auth in WebUI/API
    # environment:
    #   - LOCKDOWN=true
    # Uncomment to use a local copy of the oq-engine
    # volumes:
    #   - /path/to/oq-engine/openquake:/opt/openquake/lib/python3.5/site-packages/openquake
    networks:
      - oq-cluster-net
    ports:
      - 8800:8800
    depends_on:
      - rabbitmq
  worker:
    build:
      context: .
      dockerfile: Dockerfile.worker
    image: openquake/engine-worker
    entrypoint: ["./celery-wait.sh"]
    networks:
      - oq-cluster-net
    depends_on:
      - rabbitmq

networks:
  oq-cluster-net:

version: '3'
services:
  rabbitmq:
    image: rabbitmq:3
    container_name: oq-cluster-rabbitmq
    environment:
      - RABBITMQ_DEFAULT_VHOST=openquake 
      - RABBITMQ_DEFAULT_USER=openquake
      - RABBITMQ_DEFAULT_PASS=openquake
    networks:
      - oq-cluster-net
  # Engine is not actually executed and is
  # exposed only to make sure it is built via
  # docker-compose build
  engine:
    build:
      context: .
      dockerfile: Dockerfile.engine
    image: openquake/engine
    command: '-c true'
  master:
    build:
      context: .
      dockerfile: Dockerfile.master
    image: openquake/engine-master
    container_name: oq-cluster-master
    # Uncomment to enable auth in WebUI/API
    # environment:
    #   - LOCKDOWN=true
    # Uncomment to use a local copy of the oq-engine
    # volumes:
    #   - /path/to/oq-engine/openquake:/opt/openquake/lib/python3.5/site-packages/openquake
    networks:
      - oq-cluster-net
    ports:
      - 8800:8800
    depends_on:
      - engine
      - rabbitmq
  worker:
    build:
      context: .
      dockerfile: Dockerfile.worker
    image: openquake/engine-worker
    entrypoint: ["./celery-wait.sh"]
    networks:
      - oq-cluster-net
    depends_on:
      - engine
      - rabbitmq

networks:
  oq-cluster-net:

Fix build for the engine in docker compose
Fix build for the engine in docker compose
