From 2b3d7fae99c6b3ef0f6a17b5bdc88dba4a38e464 Mon Sep 17 00:00:00 2001 From: William Horka Date: Thu, 11 Dec 2025 11:55:08 -0500 Subject: [PATCH 1/3] feat: copy ondemand.d files on startup to configure OOD --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 16e89ee2e..24708c70d 100644 --- a/Makefile +++ b/Makefile @@ -7,17 +7,22 @@ include tools/make/ood_versions.mk COMPOSE_CMD = docker compose WORKING_DIR := $(shell pwd) DOC_BUILDER_IMAGE := python:3.11-slim +WORKING_DIR := $(shell pwd) +CONFIG_DIR := $(WORKING_DIR)/config ENV := env OOD_IMAGE=$(OOD_IMAGE) OOD_UID=$(OOD_UID) OOD_GID=$(OOD_GID) loop_up: loop_down - $(ENV) $(COMPOSE_CMD) -p loop_passenger up --build || : + $(ENV) $(COMPOSE_CMD) -p loop_passenger up --build -d || : loop_down: $(ENV) $(COMPOSE_CMD) -p loop_passenger down -v || : dev_up: dev_down - $(ENV) $(COMPOSE_CMD) -f docker-compose.yml -f docker/docker-local-override.yaml -p loop_passenger up --build || : + $(ENV) $(COMPOSE_CMD) -f docker-compose.yml -f docker/docker-local-override.yaml -p loop_passenger up --build -d +# These must be copied not bind-mounted b/c docker will present bind-mounted files and being owned by the calling user but OOD requires that config files be owned by root when run in rails_env=production + docker cp $(CONFIG_DIR)/ondemand.d passenger_loop_ood:/etc/ood/config + docker exec -u 0 passenger_loop_ood chown -hR root:root /etc/ood/config/ondemand.d dev_down: $(ENV) $(COMPOSE_CMD) -f docker-compose.yml -f docker/docker-local-override.yaml -p loop_passenger down -v || : From 327ecb8042a3399534e4810e0d36a214305e7215 Mon Sep 17 00:00:00 2001 From: William Horka Date: Mon, 15 Dec 2025 15:06:59 -0500 Subject: [PATCH 2/3] update docs with new `make dev_up` behavior --- docs/guide/content/development_guide/index.md | 9 +++++---- .../content/development_guide/local_environment.md | 12 +++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/guide/content/development_guide/index.md b/docs/guide/content/development_guide/index.md index b5cd41759..758d1bad5 100644 --- a/docs/guide/content/development_guide/index.md +++ b/docs/guide/content/development_guide/index.md @@ -12,12 +12,13 @@ make loop_build make dev_up ``` The `make dev_up` command starts the development environment using Docker Compose with local development configuration. -It runs in the foreground, streaming logs from all containers to your terminal. -The shell prompt will not return until you stop the environment manually. +It runs in the background. The shell prompt will return immediately. -To stop the environment, press Ctrl+C. This will gracefully shut down all containers. -Alternatively, in another terminal you can run: `make dev_down` +To stop the environment, run: +```bash +make dev_down +``` Once the containers are running visit [https://localhost:33000/pun/sys/loop](https://localhost:33000/pun/sys/loop) and log in with the test user `ood/ood`. The documentation is organized by topic to help you find what you need quickly: diff --git a/docs/guide/content/development_guide/local_environment.md b/docs/guide/content/development_guide/local_environment.md index 5f55ba996..5b5f5d049 100644 --- a/docs/guide/content/development_guide/local_environment.md +++ b/docs/guide/content/development_guide/local_environment.md @@ -56,17 +56,19 @@ make dev_up ``` The `make dev_up` command starts the development environment using Docker Compose with local development configuration. -It runs in the foreground, streaming logs from all containers to your terminal. -The shell prompt will not return until you stop the environment manually. +It runs in the background. The shell prompt will return immediately. -To stop the environment, press Ctrl+C. This will gracefully shut down all containers. -Alternatively, in another terminal you can run: `make dev_down` +To stop the environment, run: + +```bash +make dev_down +``` #### Development vs Vanilla Environment The project provides two different targets for running the application locally: -- **`make dev_up`** - **Recommended for development**. Uses additional volume mounts for local configuration and development files. This target loads both the main `docker-compose.yml` and the local override file `docker/docker-local-override.yaml`. +- **`make dev_up`** - **Recommended for development**. Uses additional volume mounts and copies files for local configuration and development. This target loads both the main `docker-compose.yml` and the local override file `docker/docker-local-override.yaml`. - **`make loop_up`** - **Vanilla installation**. Uses only the base Docker Compose configuration without local development overrides. Use this when you need to test the application in a configuration closer to production or for troubleshooting configuration issues. From ad089804fb320d5a5c7323ef39b6f772f384294c Mon Sep 17 00:00:00 2001 From: Evan Sarmiento Date: Tue, 16 Dec 2025 10:59:18 -0500 Subject: [PATCH 3/3] feat(ondemand): add loop configuration for file uploads --- config/ondemand.d/.empty | 0 config/ondemand.d/loop.yml | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 config/ondemand.d/.empty create mode 100644 config/ondemand.d/loop.yml diff --git a/config/ondemand.d/.empty b/config/ondemand.d/.empty new file mode 100644 index 000000000..e69de29bb diff --git a/config/ondemand.d/loop.yml b/config/ondemand.d/loop.yml new file mode 100644 index 000000000..2d660b790 --- /dev/null +++ b/config/ondemand.d/loop.yml @@ -0,0 +1,5 @@ +files_select_target: + endpoint: /pun/sys/loop/connect + label: "Send to Loop" + title: "Send the selected files to the OnDemand Loop application for upload" + icon: "fas://paper-plane"