fix(docker): pre-create /app/data in engine image and add named data volume - #1925
fix(docker): pre-create /app/data in engine image and add named data volume#1925salarkhannn wants to merge 1 commit into
Conversation
|
@salarkhannn is attempting to deploy a commit to the motia Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe Dockerfile adds an alpine prep stage to create ChangesPersistent /app/data volume fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@engine/Dockerfile`:
- Line 1: The prep stage in the Dockerfile uses a mutable Alpine tag, so update
the FROM line for the prep stage to a digest-pinned Alpine image instead of
alpine:3.21. Keep the existing prep stage name unchanged, and ensure the pinned
reference is used wherever the builder stage is defined so builds remain
reproducible.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8b6e85e3-dd31-4051-8067-ba6de893756c
📒 Files selected for processing (3)
engine/Dockerfileengine/docker-compose.ymlengine/tests/fixtures/templates/docker/docker-compose.yml
| @@ -1,4 +1,8 @@ | |||
| FROM alpine:3.21 AS prep | |||
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== engine/Dockerfile =="
cat -n engine/Dockerfile
echo
echo "== other FROM references in engine/ =="
rg -n '^FROM ' engine -g 'Dockerfile*' || true
echo
echo "== any existing digest-pinned base images =="
rg -n '`@sha256`:' engine -g 'Dockerfile*' || trueRepository: iii-hq/iii
Length of output: 1219
Pin the Alpine builder stage to a digest. alpine:3.21 is mutable, so the prep image can drift independently of this commit.
🤖 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 `@engine/Dockerfile` at line 1, The prep stage in the Dockerfile uses a mutable
Alpine tag, so update the FROM line for the prep stage to a digest-pinned Alpine
image instead of alpine:3.21. Keep the existing prep stage name unchanged, and
ensure the pinned reference is used wherever the builder stage is defined so
builds remain reproducible.
Source: Path instructions
bf6648d to
f7426ce
Compare
…volume The engine image runs as UID 65532 (distroless nonroot) but /app is owned by root, so the configuration worker's default ./data/configuration path is unwritable. Pre-create /app/data owned by 65532 via a multi-stage build stage so that a named volume mounted there inherits correct ownership. Also add an iii_data named volume to both the engine's docker-compose.yml and the project init template fixture so fresh docker compose up boots without manual edits. Closes iii-hq#1883
f7426ce to
af3d35a
Compare
The engine image runs as UID 65532 (distroless nonroot) but
/appis owned by root, so the configuration worker's default./data/configurationpath is unwritable. Pre-create/app/dataowned by 65532 via an Alpine build stage so that a named volume mounted there inherits correct ownership.Also adds an
iii_datanamed volume to bothengine/docker-compose.ymland the project init docker template fixture so a freshiii project init --docker && docker compose upboots without manual edits.Closes #1883
Summary by CodeRabbit
/app/data(including the provided Docker Compose setup and its template fixture).