From b79f730bf1fba31424fa6736c18c91a243e11c83 Mon Sep 17 00:00:00 2001 From: Rob Kooper Date: Mon, 29 Apr 2024 09:28:03 -0500 Subject: [PATCH] docker-compose updates --- CHANGELOG.md | 5 ++- README.md | 14 ++++--- docker-compose.testing.yml | 82 ++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 4 +- 4 files changed, 97 insertions(+), 8 deletions(-) create mode 100644 docker-compose.testing.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 0207025..a5563cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [0.4.0] - 2024-04-26 +## [0.4.0] - 2024-04-29 ### Added - can now set a prefix for all queue names (PREFIX="") @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - renamed server folder to cdrhook - monitor shows number of messages processing, "61 / 1" means 61 messages waiting, 1 being processed +### Fixed +- RabbitMQ is now pinned to v3.13 + ## [0.3.0] - 2024-04-23 ### Added diff --git a/README.md b/README.md index 675effc..8cce891 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,14 @@ processing has three (maye four) steps: - run uiuc-pipeline to process the downloaded image - upload the processed image back to CDR. -To use this application you need to first copy env.example to .env and modify the values. You will -at least need to set `SERVER_NAME` and `CDR_TOKEN`. +To use this application you need to first copy env.example to .env and modify the values. You +will at least need to set `SERVER_NAME` and `CDR_TOKEN`. -The unregister.sh script can be used to remove any hanging registrations with CDR, and the versions.sh -script can be used to set the version for the cdr-hook application. +The unregister.sh script can be used to remove any hanging registrations with CDR, and the +versions.sh script can be used to set the version for the cdr-hook application. -This also contains a simple monitor to see the number of messages in the queue that still need processing. +This also contains a simple monitor to see the number of messages in the queue that still need +processing. + +By default `docker compose up` will only start the cdrhook, rabbitmq and traefik. To run the +full stack use: `docker compose --profile pipeline up -d` diff --git a/docker-compose.testing.yml b/docker-compose.testing.yml new file mode 100644 index 0000000..4e02235 --- /dev/null +++ b/docker-compose.testing.yml @@ -0,0 +1,82 @@ +# save this as docker-compose.override.yml to override the default docker-compose.yml + +services: + # show the traefik dashboard + traefik: + labels: + - "traefik.enable=true" + - "traefik.http.routers.api.rule=Host(`${SERVER_NAME}`)" + - "traefik.http.routers.api.service=api@internal" + + # keep all events, good for debugging + cdrhook: + environment: + CDR_KEEP_EVENT: "yes" + PREFIX: "" + + # simple filebrower to browse all the data downloaded + filebrowser: + image: hurlenko/filebrowser + volumes: + - "filebrowser:/data" + - "data:/data/data" + - "logs:/data/logs" + - "output:/data/output" + - "feedback:/data/feedback" + environment: + - FB_BASEURL=/filebrowser + - FB_NOAUTH=true + labels: + - "traefik.enable=true" + - "traefik.http.routers.filebrowser.rule=Host(`${SERVER_NAME}`) && PathPrefix(`/filebrowser`)" + + # open rabbitmq to the internet + rabbitmq: + ports: + - "5672:5672" + - "15672:15672" + +# map volumes to paths on disk, not inside docker +volumes: + traefik: + driver: local + driver_opts: + type: none + device: /data/volumes/traefik + o: bind + rabbitmq: + driver: local + driver_opts: + type: none + device: /data/volumes/rabbitmq + o: bind + data: + driver: local + driver_opts: + type: none + device: /data/volumes/data + o: bind + logs: + driver: local + driver_opts: + type: none + device: /data/volumes/logs + o: bind + output: + driver: local + driver_opts: + type: none + device: /data/volumes/output + o: bind + feedback: + driver: local + driver_opts: + type: none + device: /data/volumes/feedback + o: bind + filebrowser: + driver: local + driver_opts: + type: none + device: /data/volumes/filebrowser + o: bind diff --git a/docker-compose.yml b/docker-compose.yml index 1808a0f..4c8cdb9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: # MESSAGE BROKER # ---------------------------------------------------------------------- rabbitmq: - image: rabbitmq:management-alpine + image: rabbitmq:3.13-management hostname: rabbitmq restart: unless-stopped environment: @@ -139,7 +139,7 @@ services: build: uploader restart: "unless-stopped" profiles: - - uploader + - pipeline depends_on: - rabbitmq environment: