version: '3'
services:

  slurmclustermaster-main:
    image: "rosetta/slurmclustermaster"
    container_name: slurmclustermaster-main
    hostname: slurmclustermaster-main
    environment:
      - SAFEMODE=False
    privileged: true
    volumes:
      - ./data/shared:/shared
      # - ./data/singularity_cache:/rosetta/.singularity/cache # Not working, check permissions...
    ports:
      - "8590:8590"
      - "5900:5900"

  slurmclusterworker-one:
    image: "rosetta/slurmclusterworker"
    container_name: slurmclusterworker-one
    hostname: slurmclusterworker-one
    environment:
      - SAFEMODE=False
    privileged: true
    volumes:
      - ./data/shared:/shared
    ports:
      - "8591:8590"
      - "5901:5900"

  dregistry:
    container_name: dregistry
    hostname: dregistry
    image: "rosetta/dregistry"
    volumes:
      - ./data/dregistry:/var/lib/registry
    ports:
      - "5000:5000"

  webapp:
    image: "rosetta/webapp"
    container_name: webapp
    hostname: webapp
    environment:
      - SAFEMODE=False
      - DJANGO_LOG_LEVEL=CRITICAL
      - ROSETTA_LOG_LEVEL=DEBUG
    ports:
      - "8080:8080"
      - "8000:8590"
      - "8592:8592"
      - "7000-7005:7000-7005"
    volumes:
      - ./data_rosetta/webapp/data:/data
      - ./data_rosetta/webapp/log:/var/log/webapp
      - /var/run/docker.sock:/var/run/docker.sock
      #- ./images/webapp/code:/opt/webapp_code








