feat(web): add a Docker Compose deploy option to app download instructions (BUNYIP-372) #370

Merged
nrupard merged 1 commit from feat/BUNYIP-372-compose-download-instructions into main 2026-07-15 22:34:30 +02:00
Owner

Summary

Adds a copy-pasteable Docker Compose deploy path to the per-app download instructions, per BUNYIP-372. The container_instructions helper (shared across every OCI-shipping app) offered only docker login / docker pull / docker run; an operator self-hosting a real service had to hand-write a compose file from the bare docker run starting point.

Change

  • New fourth step "Or deploy with Docker Compose (save as compose.yml)": a compose.yml skeleton (one app service with the interpolated image reference, restart: unless-stopped, and commented placeholders for ports / environment / volumes) plus docker compose up -d.
  • New compose_block helper: renders the multi-line snippet in a newline-preserving <pre><code class="whitespace-pre"> with a Copy button. command_block could not be reused because its whitespace-nowrap collapses a YAML block to one line.

App-agnostic + safe

  • Only the image reference is interpolated; no per-app env/ports/volumes are baked in (matches the existing "add the ports, env, and volumes the app needs" note). Correct across every OCI app even though mokosh is the only public one today.
  • Same trust model as command_block: the snippet is passive Maud-escaped <code> / data-copy content, and the click handler is the static COPY_CMD_JS constant, so no API-sourced value enters executable JS.
  • Updated the container_instructions doc comment to note the compose path.

Verified

just check-container scope: fmt + clippy (-D warnings) on bunyip-web green.

#BUNYIP-372

🤖 Generated with Claude Code

## Summary Adds a copy-pasteable Docker Compose deploy path to the per-app download instructions, per BUNYIP-372. The `container_instructions` helper (shared across every OCI-shipping app) offered only `docker login` / `docker pull` / `docker run`; an operator self-hosting a real service had to hand-write a compose file from the bare `docker run` starting point. ## Change - New fourth step "Or deploy with Docker Compose (save as compose.yml)": a `compose.yml` skeleton (one `app` service with the interpolated image reference, `restart: unless-stopped`, and commented placeholders for ports / environment / volumes) plus `docker compose up -d`. - New `compose_block` helper: renders the multi-line snippet in a newline-preserving `<pre><code class="whitespace-pre">` with a Copy button. `command_block` could not be reused because its `whitespace-nowrap` collapses a YAML block to one line. ## App-agnostic + safe - Only the image reference is interpolated; no per-app env/ports/volumes are baked in (matches the existing "add the ports, env, and volumes the app needs" note). Correct across every OCI app even though mokosh is the only public one today. - Same trust model as `command_block`: the snippet is passive Maud-escaped `<code>` / `data-copy` content, and the click handler is the static `COPY_CMD_JS` constant, so no API-sourced value enters executable JS. - Updated the `container_instructions` doc comment to note the compose path. ## Verified `just check-container` scope: fmt + clippy (`-D warnings`) on `bunyip-web` green. #BUNYIP-372 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(web): add a Docker Compose deploy option to app download instructions (BUNYIP-372)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 24s
Check / fmt + clippy + build + tests (pull_request) Successful in 9m59s
Create release / Create release from merged PR (pull_request) Has been skipped
6edd143e90
The per-app container instructions (`container_instructions`, a shared helper run for every OCI-shipping app) offered only `docker login` / `docker pull` / `docker run`. An operator self-hosting a real service (ports, env, volumes, a companion database) had to hand-write a compose file from the bare `docker run` starting point.

Adds a fourth step, "Or deploy with Docker Compose", rendering a copy-pasteable `compose.yml` skeleton (one `app` service with the interpolated image reference, `restart: unless-stopped`, and commented placeholders for ports/environment/volumes) plus `docker compose up -d`. The skeleton is app-agnostic: only the image reference is interpolated, matching the existing "add the ports, env, and volumes the app needs" note, so it stays correct across every OCI app even though mokosh is the only public one today.

New `compose_block` helper renders the multi-line snippet in a newline-preserving `<pre><code>` (command_block's whitespace-nowrap collapses a YAML block to one line). Same trust model as command_block: the snippet is passive Maud-escaped content plus the button's data-copy attribute, and the click handler is the static COPY_CMD_JS constant, so no API-sourced value ever enters executable JS.

#BUNYIP-372

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard deleted branch feat/BUNYIP-372-compose-download-instructions 2026-07-15 22:34:30 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!370
No description provided.