Repository navigation
digitalocean: move Dockerfile to repo root so DO auto-detect works - #250
Conversation
When deploying via DO's "Create App" dashboard flow (the common
path; the /apps/new/spec YAML-paste page returns errors lately),
the UI requires a Dockerfile to be auto-detected. With our
Dockerfile at digitalocean/Dockerfile, an empty Source Directory
gets "No components detected" -- and setting Source Directory to
`digitalocean` would change the build context to `/digitalocean/`,
which breaks the Dockerfile's `COPY Makefile` / `COPY src` lines
since those files aren't inside the subfolder.
Fix: move the Dockerfile to the repo root. Build context stays at
the repo root (App Spec source_dir: /), and every COPY in the
Dockerfile -- src/, Makefile, digitalocean/entrypoint.sh,
digitalocean/config.template.json -- continues to resolve relative
to that. The .dockerignore wholesale-excludes the noise.
Operator flow now:
1. cloud.digitalocean.com/apps/new
2. GitHub source, pick the repo, pick branch
3. Source Directory: leave blank (root)
4. Resource type auto-detects Dockerfile
5. Set secrets, deploy
Files changed:
- Dockerfile: moved from digitalocean/Dockerfile to repo root.
Comment block updated to explain why it lives here.
- digitalocean/.do/app.yaml: dockerfile_path changed from
`digitalocean/Dockerfile` to `Dockerfile`.
- digitalocean/Makefile: local docker build now -f Dockerfile.
- digitalocean/README.md: file tree updated showing Dockerfile
at root; deploy flow rewritten as the dashboard-driven path
(Option A) with an explicit "do NOT set Source Directory to
digitalocean" warning; doctl path stays as Option B.
No PasClaw core changes. `make smoke` green.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5508b370f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| deploy_on_push: true | ||
| source_dir: / | ||
| dockerfile_path: digitalocean/Dockerfile | ||
| dockerfile_path: Dockerfile |
There was a problem hiding this comment.
Preserve the old DigitalOcean Dockerfile path
Existing App Platform apps created from the previous bundled spec keep their stored dockerfile_path as digitalocean/Dockerfile; DigitalOcean treats that value as a repo-relative Dockerfile path and fails the deployment when it no longer exists. Because the spec also enables deploy_on_push, merging this commit can make current production apps fail their next automatic rebuild before operators have a chance to apply the updated spec. Keep a compatibility Dockerfile at the old path or provide a migration that avoids breaking those existing apps.
Useful? React with 👍 / 👎.
… wiring The PR FMXExpress#250 root Dockerfile was written from scratch and missed several units (`opensslsockets` in LocalVector.OrtProvision is the latest casualty after `SyncObjs` from PR FMXExpress#251) AND didn't bring in the libssl1.0 RPATH/multi-arch/buildx work from docker/Dockerfile that was carefully sorted out in PR FMXExpress#121. docker/Dockerfile has been the canonical "this builds and runs" shape since PR FMXExpress#121 -- bookworm builder + `fpc` meta-package (pulls every fp-units-*), multi-arch libssl1.0.2 fetched from snapshot.debian.org's immutable archive, patched RPATH=$ORIGIN so Indy's plain `dlopen("libssl.so")` resolves to the bundled libraries. Container2wasm builds use the same Dockerfile via `make C2W=1 browser` -> `--build-arg C2W=1`. This PR: - Moves docker/Dockerfile to the repo root (overwrites the broken PR FMXExpress#250 root Dockerfile in place). - Adds the DigitalOcean App Platform first-boot wiring at the end of the runtime stage: COPY digitalocean/entrypoint.sh /usr/local/bin/... COPY digitalocean/config.template.json /etc/pasclaw/... ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["gateway", "--addr", "0.0.0.0", "--port", "8088"] - Rewrites digitalocean/entrypoint.sh to handle BOTH the default case (no CMD args -> gateway) AND pass-through (`docker run pasclaw version` / `agent -m "..."` / etc. flow verbatim). The original PR FMXExpress#248 entrypoint always hardcoded `gateway` which would have broken the `docker run pasclaw version` use case that docker/README.md documents. - Updates docker/README.md: drops `-f docker/Dockerfile` from the build commands (no longer needed). The Quick start, multi- arch buildx, and Configuration sections all stay accurate. - Removes the now-unused docker/Dockerfile. Net effect: - DigitalOcean App Platform now builds end-to-end (the `opensslsockets` Fatal goes away because fpc meta pulls fp-units-net implicitly). - Docker Hub / GHCR push paths from docker/README.md continue to work, just without the -f flag. - Container2wasm builds (`make C2W=1 browser`) continue to work -- the C2W=1 build-arg is preserved. - One Dockerfile, one canonical container shape, no more drift between the docker/ and root flavours. PasClaw core untouched; `make smoke` green.
Summary
Moves the DigitalOcean Dockerfile from
digitalocean/Dockerfileto the repo root so DO App Platform's dashboard "Create App" flow auto-detects it without operator config.Why
The current
digitalocean/Dockerfiledoesn't work with DO's UI deploy:"No components detected".digitalocean→ DO finds the Dockerfile there but the build context becomes/digitalocean/. The Dockerfile'sCOPY MakefileandCOPY srcreference paths at the repo root, which don't exist relative to/digitalocean/→docker buildfails on the firstCOPY./apps/new/spec→ DO appears to have deprecated that page; operators report it errors out.The only reliable UI flow is to put the Dockerfile at the repo root. The build context stays at
/(repo root), everyCOPYin the Dockerfile continues to resolve relative to that (src/,Makefile,digitalocean/entrypoint.sh,digitalocean/config.template.json), and.dockerignorealready wholesale-excludes the noise (docs/,cog/,browser/,vendor/Indy/, etc.).Operator flow now
cloud.digitalocean.com/apps/newdo NOTchange todigitaloceanPASCLAW_GATEWAY_TOKEN,ANTHROPIC_API_KEY, ...) plusPASCLAW_HOME=/data/pasclawandPORT=8088Files
Dockerfile(NEW location) — moved fromdigitalocean/Dockerfile. Comment block updated to explain why it lives at the root.digitalocean/.do/app.yaml—dockerfile_path: digitalocean/Dockerfile→dockerfile_path: Dockerfile.digitalocean/Makefile—docker build -f digitalocean/Dockerfile→-f Dockerfile.digitalocean/README.md— file tree updated; deploy flow rewritten as dashboard-driven (Option A) with an explicit "do NOT set Source Directory todigitalocean" warning;doctlpath stays as Option B.Test plan
make smoke— greengit mvpreserves history (the file rename is detected as 90% similarity ingit diff).Scope
4 files, no PasClaw core changes. The Dockerfile content is unchanged except for the comment block at the top.
Generated by Claude Code