Skip to content

docs(adr): Docker surface decisions (compose, base image, Dockerfile split) - #853

Merged
LucasSantana-Dev merged 4 commits into
release/v2.11.0from
docs/docker-decision-adrs
May 14, 2026
Merged

LucasSantana-Dev merged 4 commits into
release/v2.11.0from
docs/docker-decision-adrs

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented May 14, 2026 •

Copy link
Copy Markdown
Owner

Records three ADRs produced by /research-and-decide covering the Docker surface:

  1. Stay docker-compose — Kubernetes/Swarm overhead not justified for single-host homelab
  2. Stay node:22-alpine — @discordjs/opus prebuilt-binary gap exists in all variants; musl was a false lead
  3. Keep Dockerfile.frontend separate — superseded by PR refactor(docker): consolidate Dockerfile.frontend into main multi-stage build #851 which actually consolidated it

ADRs document the investigation rationale so future contributors understand why these choices were made and when to revisit.

Summary by CodeRabbit

  • Documentation
    • Added architectural decision records documenting infrastructure choices: staying on Alpine-based container images for production, maintaining separate frontend and backend Docker configurations, and continuing with Docker Compose for single-node deployments.

Review Change Stack

Three linked decisions from `/research-and-decide` composite on chore/docker-overhaul:

1. `2026-05-13-frontend-dockerfile-keep-separate.md` — Keep separate (deferred
   consolidation). 12-month review trigger + 3 hard escalation triggers.

2. `2026-05-13-orchestration-stay-on-compose.md` — Stay on docker-compose v2.
   Explicit acknowledgement of docker.sock blast radius (per critic). 5 hard
   revisit triggers including 90-day observability-data checkpoint.

3. `2026-05-13-base-image-stay-on-alpine.md` — Flipped from Phase-1's
   recommendation (bookworm-slim). Critic surfaced that PR #846's root cause
   was prebuilt-binary availability for @discordjs/opus, not musl vs glibc.
   Migration would not have prevented the break.

Phase-1 research dispatched 3 parallel agents (general-purpose). Phase-2 critic
(Opus) stress-tested all three leaders + identified cross-decision interactions.
All revisit triggers are concrete + measurable.

Branch parks on docs/docker-decision-adrs because PR #848 is open against
release/v2.11.0 and feedback_no_pr_stacking_2026-05-09 limits to 1 PR per base.
@vercel

vercel Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment May 14, 2026 6:55pm

Request Review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 7 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5526b7bc-88ac-457b-a5cd-6d287a3f3e95

📥 Commits

Reviewing files that changed from the base of the PR and between 8be65e0 and 5e23095.

📒 Files selected for processing (1)
  • docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md
📝 Walkthrough

Walkthrough

This PR adds three architectural decision records documenting recent infrastructure choices: staying on Alpine base images for production containers, keeping the frontend Dockerfile separate rather than consolidating, and continuing with Docker Compose v2 for orchestration. All decisions include rationale, alternatives, consequences, and explicit revisit conditions.

Changes

Infrastructure Architecture Decisions

Layer / File(s) Summary
Base image decision: stay on Alpine
docs/decisions/2026-05-13-base-image-stay-on-alpine.md
Documented decision to use node:22-alpine for bot/backend and nginxinc/nginx-unprivileged:1.27-alpine for frontend, based on re-evaluation showing the root cause of prior issues was @discordjs/opus prebuilt availability rather than musl vs glibc. Lists alternatives, consequences (image size, native-module build requirements, observability dependency), and revisit triggers (prebuilt availability, CVE severity, new glibc-only deps, image size threshold).
Frontend Dockerfile organization: keep separate
docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md
Documented decision to keep Dockerfile.frontend separate for now, deferring consolidation approaches. Records context from recent Dockerfile changes and the operational concern that frontend npm ci pulls in bot's @discordjs/opus dependency. Enumerates alternatives, lists consequences (cache duplication, redundant prisma generate), and defines explicit triggers for revisiting consolidation options.
Orchestration: stay on Docker Compose v2
docs/decisions/2026-05-13-orchestration-stay-on-compose.md
Documented decision to remain on Docker Compose v2 for single-node homelab deployment. Records background from PR #848, alternatives (Nomad, k3s, Podman+quadlet, Docker Swarm), and acknowledged consequences including security constraints (mounting /var/run/docker.sock into webhook container). Defines revisit triggers tied to OOM frequency, downtime, scaling needs, and 90-day observability milestones.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • LucasSantana-Dev/Lucky#847: Documents the @discordjs/opus prebuilt binary constraint that blocks Alpine migration—the same blocker this ADR references and that issue tracks for resolution once prebuilts are available.

Possibly related PRs

  • LucasSantana-Dev/Lucky#848: The Docker/image decisions and orchestration setup codified in these ADRs align with and reference the deployment changes in PR #848.

Suggested labels

infra

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: adding three ADRs documenting Docker-related architectural decisions (compose, base image, Dockerfile split). It is concise, specific, and clearly conveys the primary scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/docker-decision-adrs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md (2)

61-61: ⚡ Quick win

File should end with a newline.

POSIX convention and many tools expect text files to end with a newline character.

📝 Proposed fix
 - `feedback_tbd_release_branches` memory
+
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md` at line 61,
The file docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md is
missing a trailing newline; update the file to ensure it ends with a single
newline character (add a line break at EOF) so it follows POSIX conventions and
satisfies tools that expect files to terminate with a newline.

18-18: 💤 Low value

Inconsistent terminology: "Pre-build" vs "prebuilt".

Line 18 uses "Pre-build" while line 12 (and elsewhere in the codebase) uses "prebuilt". Consider standardizing to "prebuilt" for consistency.

📝 Proposed terminology fix
-4. Pre-build dist in CI and ship a slim nginx
+4. Prebuilt dist in CI and ship a slim nginx
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md` at line 18,
The document uses inconsistent terminology: change the phrase "Pre-build" to
"prebuilt" so it matches the rest of the codebase; update the occurrence of
"Pre-build dist in CI and ship a slim nginx" to "Prebuilt dist in CI and ship a
slim nginx" (search for the literal "Pre-build" and replace it with "prebuilt"
in the decision document to standardize wording).
docs/decisions/2026-05-13-orchestration-stay-on-compose.md (1)

57-57: ⚡ Quick win

File should end with a newline.

POSIX convention and many tools expect text files to end with a newline character.

📝 Proposed fix
 - Critic Phase-2 findings on docker.sock + escalation criteria
+
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/decisions/2026-05-13-orchestration-stay-on-compose.md` at line 57, Add a
single trailing newline character to the end of the document
2026-05-13-orchestration-stay-on-compose.md so the file ends with a newline
(POSIX-compatible); simply open the file and ensure there is a newline after the
last line/paragraph and save the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md`:
- Around line 1-23: The ADR "Keep `Dockerfile.frontend` separate (deferred
consolidation)" currently says "Accepted (deferred)" but contradicts an open
superseding PR; update the ADR to remove the ambiguity by either changing the
Status line to "Superseded" and adding a short reference to PR `#851` (include PR
number and a brief note that it consolidates the Dockerfiles), or if you prefer
to keep "Accepted (deferred)" temporarily, add an explicit "Supersession note"
below the Decision that acknowledges PR `#851` is open and intends to supersede
this ADR; ensure you edit the document title/Status block and add a one-line
footnote referencing PR `#851` and its intent so readers aren’t misled.

---

Nitpick comments:
In `@docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md`:
- Line 61: The file
docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md is missing a
trailing newline; update the file to ensure it ends with a single newline
character (add a line break at EOF) so it follows POSIX conventions and
satisfies tools that expect files to terminate with a newline.
- Line 18: The document uses inconsistent terminology: change the phrase
"Pre-build" to "prebuilt" so it matches the rest of the codebase; update the
occurrence of "Pre-build dist in CI and ship a slim nginx" to "Prebuilt dist in
CI and ship a slim nginx" (search for the literal "Pre-build" and replace it
with "prebuilt" in the decision document to standardize wording).

In `@docs/decisions/2026-05-13-orchestration-stay-on-compose.md`:
- Line 57: Add a single trailing newline character to the end of the document
2026-05-13-orchestration-stay-on-compose.md so the file ends with a newline
(POSIX-compatible); simply open the file and ensure there is a newline after the
last line/paragraph and save the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 73702f55-dfdb-427a-858b-c8b5f1d8d7b5

📥 Commits

Reviewing files that changed from the base of the PR and between ab0ff9e and 8be65e0.

📒 Files selected for processing (3)
  • docs/decisions/2026-05-13-base-image-stay-on-alpine.md
  • docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md
  • docs/decisions/2026-05-13-orchestration-stay-on-compose.md

Comment thread docs/decisions/2026-05-13-frontend-dockerfile-keep-separate.md

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LucasSantana-Dev has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit c2e9bd9 into release/v2.11.0 May 14, 2026
17 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the docs/docker-decision-adrs branch May 14, 2026 19:02

This branch was successfully deployed

1 active deployment
Preview — 5e230954 Deployed May 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant