Skip to content

digitalocean: move Dockerfile to repo root so DO auto-detect works - #250

Merged
FMXExpress merged 1 commit into
mainfrom
claude/dockerfile-at-repo-root
Jun 13, 2026
Merged

FMXExpress merged 1 commit into
mainfrom
claude/dockerfile-at-repo-root

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Summary

Moves the DigitalOcean Dockerfile from digitalocean/Dockerfile to the repo root so DO App Platform's dashboard "Create App" flow auto-detects it without operator config.

Why

The current digitalocean/Dockerfile doesn't work with DO's UI deploy:

  • Source Directory empty → DO scans the repo root for a Dockerfile, doesn't find one → "No components detected".
  • Source Directory = digitalocean → DO finds the Dockerfile there but the build context becomes /digitalocean/. The Dockerfile's COPY Makefile and COPY src reference paths at the repo root, which don't exist relative to /digitalocean/ → docker build fails on the first COPY.
  • YAML-paste at /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), every COPY in the Dockerfile continues to resolve relative to that (src/, Makefile, digitalocean/entrypoint.sh, digitalocean/config.template.json), and .dockerignore already wholesale-excludes the noise (docs/, cog/, browser/, vendor/Indy/, etc.).

Operator flow now

  1. cloud.digitalocean.com/apps/new
  2. GitHub source → pick the repo → pick branch
  3. Source Directory: leave blank (root) — do NOT change to digitalocean
  4. Resource type auto-detects Dockerfile
  5. Set the SECRET env vars (PASCLAW_GATEWAY_TOKEN, ANTHROPIC_API_KEY, ...) plus PASCLAW_HOME=/data/pasclaw and PORT=8088
  6. Deploy

Files

  • Dockerfile (NEW location) — moved from digitalocean/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 to digitalocean" warning; doctl path stays as Option B.

Test plan

  • make smoke — green
  • git mv preserves history (the file rename is detected as 90% similarity in git diff).
  • Manual: dashboard "Create App" flow against the rebased repo (operator validation; the PR description has the step-by-step).

Scope

4 files, no PasClaw core changes. The Dockerfile content is unchanged except for the comment block at the top.


Generated by Claude Code

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread digitalocean/.do/app.yaml
deploy_on_push: true
source_dir: /
dockerfile_path: digitalocean/Dockerfile
dockerfile_path: Dockerfile

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@FMXExpress
FMXExpress merged commit cdd6bdf into main Jun 13, 2026
khongten001 pushed a commit to khongten001/PasClaw that referenced this pull request Jul 13, 2026
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants