Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
Empty file added config/ondemand.d/.empty
Empty file.
5 changes: 5 additions & 0 deletions config/ondemand.d/loop.yml
Original file line number Diff line number Diff line change
@@ -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"
9 changes: 5 additions & 4 deletions docs/guide/content/development_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>Ctrl</kbd>+<kbd>C</kbd>. 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:
Expand Down
12 changes: 7 additions & 5 deletions docs/guide/content/development_guide/local_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>Ctrl</kbd>+<kbd>C</kbd>. 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.

Expand Down