| version: '3' | |
| services: | |
| girder: | |
| image: dsarchive/dsa_common | |
| build: ../.. | |
| # Instead of privileged mode, fuse can use: | |
| # devices: | |
| # - /dev/fuse:/dev/fuse | |
| # security_opt: | |
| # - apparmor:unconfined | |
| # cap_add: | |
| # - SYS_ADMIN | |
| # but these may be somewhat host specific, so we default to privileged. If | |
| # the docker daemon is being run with --no-new-privileges, fuse may not | |
| # work. | |
| # See also https://github.com/docker/for-linux/issues/321 for possible | |
| # methods to avoid both privileged mode and cap_add SYS_ADMIN. | |
| privileged: true | |
| # Set DSA_USER to a user id that is part of the docker group (e.g., | |
| # `DSA_USER=$(id -u):$(id -g)`). This makes files in assetstores and logs | |
| # owned by that user and provides permissions to manage docker | |
| environment: | |
| DSA_USER: ${DSA_USER:-} | |
| DSA_PROVISION_YAML: ${DSA_PROVISION_YAML:-/opt/digital_slide_archive/devops/dsa/provision.yaml} | |
| restart: unless-stopped | |
| # Set DSA_PORT to expose the interface on another port (default 8080). | |
| ports: | |
| - "${DSA_PORT:-8080}:8080" | |
| volumes: | |
| # Needed to use slicer_cli_web to run docker containers | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| # Default assetstore | |
| - ./assetstore:/assetstore | |
| # Location of girder.cfg | |
| - ./girder.cfg:/etc/girder.cfg | |
| # Location of provision.py | |
| - ./provision.py:/opt/digital_slide_archive/devops/dsa/provision.py | |
| - ./provision.yaml:/opt/digital_slide_archive/devops/dsa/provision.yaml | |
| - ./start_girder.sh:/opt/digital_slide_archive/devops/dsa/start_girder.sh | |
| # Location to store logs | |
| - ./logs:/logs | |
| # For local development, uncomment the set of mounts associated with the | |
| # local source files. Adding the editable egg directories first allows | |
| # allow mounting source files from the host without breaking the internal | |
| # data. | |
| # - /opt/girder/girder.egg-info | |
| # - /opt/girder/clients/python/girder_client.egg-info | |
| # - ../../../girder:/opt/girder | |
| # - /opt/girder_worker/girder_worker.egg-info | |
| # - ../../../../girder_worker:/opt/girder_worker | |
| # - /opt/girder_worker_utils/girder_worker_utils.egg-info | |
| # - ../../../../girder_worker_utils:/opt/girder_worker_utils | |
| # - /opt/HistomicsUI/histomicsui.egg-info | |
| # - ../../../HistomicsUI:/opt/HistomicsUI | |
| # - /opt/slicer_cli_web/girder_slicer_cli_web.egg-info | |
| # - ../../../slicer_cli_web:/opt/slicer_cli_web | |
| # - /opt/large_image/girder_annotation/girder_large_image_annotation.egg-info | |
| # - /opt/large_image/girder/girder_large_image.egg-info | |
| # - /opt/large_image/sources/bioformats/large_image_source_bioformats.egg-info | |
| # - /opt/large_image/sources/openslide/large_image_source_openslide.egg-info | |
| # - /opt/large_image/sources/ometiff/large_image_source_ometiff.egg-info | |
| # - /opt/large_image/sources/pil/large_image_source_pil.egg-info | |
| # - /opt/large_image/sources/test/large_image_source_test.egg-info | |
| # - /opt/large_image/sources/dummy/large_image_source_dummy.egg-info | |
| # - /opt/large_image/sources/tiff/large_image_source_tiff.egg-info | |
| # - /opt/large_image/sources/mapnik/large_image_source_mapnik.egg-info | |
| # - /opt/large_image/sources/openjpeg/large_image_source_openjpeg.egg-info | |
| # - /opt/large_image/sources/gdal/large_image_source_gdal.egg-info | |
| # - /opt/large_image/sources/nd2/large_image_source_nd2.egg-info | |
| # - /opt/large_image/large_image.egg-info | |
| # - /opt/large_image/utilities/converter/large_image_converter.egg-info | |
| # - /opt/large_image/utilities/tasks/large_image_tasks.egg-info | |
| # - ../../../large_image:/opt/large_image | |
| # Add additional mounts here to get access to existing files on your | |
| # system. Also add them to the worker container to reduce copying. | |
| depends_on: | |
| - mongodb | |
| - memcached | |
| - rabbitmq | |
| command: /opt/digital_slide_archive/devops/dsa/start_girder.sh | |
| mongodb: | |
| image: "mongo:latest" | |
| # Set DSA_USER to your user id (e.g., `DSA_USER=$(id -u):$(id -g)`) | |
| # so that database files are owned by yourself. | |
| user: ${DSA_USER:-PLEASE SET DSA_USER} | |
| restart: unless-stopped | |
| # Limiting maxConns reduces the amount of shared memory demanded by | |
| # mongo. Remove this limit or increase the host vm.max_map_count value. | |
| command: --maxConns 1000 | |
| volumes: | |
| # Location to store database files | |
| - ./db:/data/db | |
| # Uncomment to allow access to the database from outside of the docker | |
| # network. | |
| # ports: | |
| # - "27017" | |
| logging: | |
| options: | |
| max-size: "10M" | |
| max-file: "5" | |
| memcached: | |
| image: memcached | |
| command: -m 4096 --max-item-size 8M | |
| restart: unless-stopped | |
| # Uncomment to allow access to memcached from outside of the docker network | |
| # ports: | |
| # - "11211" | |
| logging: | |
| options: | |
| max-size: "10M" | |
| max-file: "5" | |
| rabbitmq: | |
| image: "rabbitmq:latest" | |
| restart: unless-stopped | |
| # Uncomment to allow access to rabbitmq from outside of the docker network | |
| # ports: | |
| # - "5672" | |
| environment: | |
| RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-} | |
| RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-} | |
| volumes: | |
| - ./rabbitmq.advanced.config:/etc/rabbitmq/advanced.config:ro | |
| logging: | |
| options: | |
| max-size: "10M" | |
| max-file: "5" | |
| worker: | |
| image: dsarchive/dsa_common | |
| build: ../.. | |
| # Set DSA_USER to a user id that is part of the docker group (e.g., | |
| # `DSA_USER=$(id -u):$(id -g)`). This provides permissions to manage | |
| # docker | |
| environment: | |
| DSA_USER: ${DSA_USER:-} | |
| DSA_WORKER_CONCURRENCY: ${DSA_WORKER_CONCURRENCY:-2} | |
| DSA_PROVISION_YAML: ${DSA_PROVISION_YAML:-/opt/digital_slide_archive/devops/dsa/provision.yaml} | |
| TMPDIR: | |
| restart: unless-stopped | |
| volumes: | |
| # Needed to use slicer_cli_web to run docker containers | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| # Modify the worker.local.cfg to specify a different rabbitmq server and | |
| # then enable this mount. On the rabbitmq server, make sure you add a | |
| # non-guest default user and use that both in the worker and in the main | |
| # girder settings. | |
| # - ./worker.local.cfg:/opt/girder_worker/girder_worker/worker.local.cfg | |
| # Allow overriding the start command | |
| - ./start_worker.sh:/opt/digital_slide_archive/devops/dsa/start_worker.sh | |
| # Needed to allow transferring data to slicer_cli_web docker containers | |
| - ${TMPDIR:-/tmp}:${TMPDIR:-/tmp} | |
| # Add additional mounts here to get access to existing files on your | |
| # system if they have the same path as on the girder container. | |
| depends_on: | |
| - rabbitmq | |
| command: /opt/digital_slide_archive/devops/dsa/start_worker.sh | |
| logging: | |
| options: | |
| max-size: "10M" | |
| max-file: "5" | |