docs(deploy): document cwd, monorepo Dockerfile pattern, GIT-template caveat#56
docs(deploy): document cwd, monorepo Dockerfile pattern, GIT-template caveat#56marvin-69-jpg wants to merge 1 commit into
Conversation
… caveat
Adds five gotchas observed deploying a Python uv-workspace monorepo
(api + jobs services with separate Dockerfiles in infra/zeabur/) to
Zeabur:
- Direct deploy must run from the workspace root. zeabur deploy tars
the cwd; running from a subdir produces a tarball that's missing
the files the Dockerfile expects to COPY.
- Monorepo with multiple Dockerfiles: set per-service env var
ZBPACK_DOCKERFILE_PATH instead of swapping a root zbpack.json
between deploys. Env vars take precedence over zbpack.json so each
service's redeploy "just works" with no config swap.
- zbpack.json schema is nested, not flat. {"dockerfile": {"path": "..."}}
works; {"dockerfile": "..."} is silently ignored and zbpack falls
back to language autodetection (planType=python etc.).
- service deploy --template GIT --repo-id ... --branch-name ...
accepts the flags and returns success, but creates a SUSPENDED
PREBUILT_V2 service with GitTrigger=null — Git source not actually
wired, redeploy errors with Internal Server Error. Direct deploy is
the working path.
- Tips: don't retry a hung deploy without checking service list first
(creates duplicates); verify planType=docker after a Dockerfile-based
deploy.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
WalkthroughDocumentation updates to the Zeabur deployment skill guide, adding requirements for monorepo deployments from workspace root, multi-Dockerfile configuration guidance using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 the current code and only fix it if needed.
Inline comments:
In `@skills/zeabur-deploy/SKILL.md`:
- Around line 49-50: Update all inline CLI mentions in SKILL.md to use the
required entry point `npx zeabur@latest` instead of bare commands: replace
occurrences like "zeabur deploy" with "npx zeabur@latest deploy" and "service
deploy" with "npx zeabur@latest service deploy". Target the paragraph headed
"Run from the workspace root." (the sentence referencing `zeabur deploy`) and
also update the other occurrences called out in the review (the mentions around
lines 116-117 and 181-182) so every inline command reference uses `npx
zeabur@latest`.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b93d41b6-90b0-4390-9370-b9280d4d7d91
📒 Files selected for processing (1)
skills/zeabur-deploy/SKILL.md
| > **Run from the workspace root.** `zeabur deploy` tars the current working directory; if you are in a subdirectory the tarball will be missing files the build needs. For monorepos, this means `cd` to the repo root before deploying — even when deploying a single service. The tarball respects `.dockerignore` for excluding files like `.venv`, `node_modules`, nested git repos. | ||
|
|
There was a problem hiding this comment.
Standardize all inline command references to npx zeabur@latest
These lines still show bare CLI forms (zeabur deploy, service deploy). Please rewrite inline command mentions to the required entry point (for example, npx zeabur@latest deploy ... and npx zeabur@latest service deploy ...) so the guidance is fully consistent.
As per coding guidelines, “All skills must use npx zeabur@latest as the CLI entry point in their CLI commands.”
Also applies to: 116-117, 181-182
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/zeabur-deploy/SKILL.md` around lines 49 - 50, Update all inline CLI
mentions in SKILL.md to use the required entry point `npx zeabur@latest` instead
of bare commands: replace occurrences like "zeabur deploy" with "npx
zeabur@latest deploy" and "service deploy" with "npx zeabur@latest service
deploy". Target the paragraph headed "Run from the workspace root." (the
sentence referencing `zeabur deploy`) and also update the other occurrences
called out in the review (the mentions around lines 116-117 and 181-182) so
every inline command reference uses `npx zeabur@latest`.
Summary
Adds five gotchas observed while deploying a Python uv-workspace monorepo (
apps/api+apps/jobswith separate Dockerfiles underinfra/zeabur/) to Zeabur via the CLI:Direct deploy must run from the workspace root.
zeabur deploytars the current working directory; running from a subdir produces a tarball missing files the Dockerfile expects. Easy to miss aftercd-ing into a subdir for testing.Monorepo with multiple Dockerfiles: set per-service env var
ZBPACK_DOCKERFILE_PATH(e.g.infra/zeabur/api.Dockerfile) instead of swapping a rootzbpack.jsonbetween deploys. Env vars take precedence overzbpack.json(per zbpack source:pkg/plan/config.goenv-var lookup runs before zbpack.json), so each service's redeploy works with no config swap.zbpack.jsonschema is nested, not flat.{\"dockerfile\": {\"path\": \"...\"}}works;{\"dockerfile\": \"...\"}is silently ignored and zbpack falls back to language autodetection (planType=python, etc.). The flat form is what most users guess on first try.service deploy --template GIT --repo-id ... --branch-name ...is broken in non-interactive mode (observed 2026-04 against CLI 0.15.0): the command returns success, but the resulting service isTemplate=PREBUILT_V2withStatus=SUSPENDEDandGitTrigger=null— the Git source is NOT actually wired.service redeploythen errors withInternal Server Error. Direct deploy is the working path.Tips additions: don't retry a hung deploy without checking
service listfirst (the upload may already be in flight; retrying creates a duplicate service with a numeric/letter suffix appended to the requested--name); verifyplanType=dockerin the latest deployment after a Dockerfile-based deploy — if it showspython/nodejs/etc., zbpack didn't find your Dockerfile.Context
I hit each of these in sequence during a real session deploying a Postgres+Redis-backed FastAPI/uv-workspace monorepo to a fresh Zeabur project. The skill's existing direct-deploy section is good for the simple-app case but is silent on monorepos and on the
service deploy --template GITfailure mode, which led to multiple wrongly-created services and ~30 min of CLI flailing before reading zbpack source.Test plan
ZBPACK_DOCKERFILE_PATHset per service: verifiedplanType=dockerand the right Dockerfile is built (api at infra/zeabur/api.Dockerfile, jobs at infra/zeabur/jobs.Dockerfile){\"dockerfile\": \"...\"}zbpack.json is ignored (build went python plan); nested{\"dockerfile\": {\"path\": \"...\"}}worksservice deploy --template GITSUSPENDED-PREBUILT_V2 result, confirmedGitTrigger=nullandservice redeployInternal Server Errorzeabur deploy --name api(gotapiandapi-toopsservices)🤖 Generated with Claude Code
Summary by CodeRabbit