Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html) — all `

## [Unreleased]

Open roadmap.
### Fixed

- **`cerefox server deploy` Edge Functions now deploy via the Supabase Management API
(`--use-api`)** instead of the local Docker bundler. The Docker bundler bind-mounts the
function source dir, which fails (`entrypoint path does not exist`) when the npm package
is installed under a path Docker Desktop won't file-share — notably **`/usr/local`** (the
classic Homebrew/`npm config set prefix /usr/local` location) — *and* Docker Desktop is
running. The API path is Docker-independent, so the deploy works regardless of where npm
placed the package or whether Docker is up. (Thanks @tdebasis — [#84].)

[#84]: https://github.com/fstamatelopoulos/cerefox/issues/84

---

Expand Down
10 changes: 9 additions & 1 deletion packages/memory/src/cli/commands/deploy-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,15 @@ async function action(options: DeployServerOptions): Promise<void> {
// (link state lives in whatever dir the user ran `supabase link`), so a
// bare deploy here couldn't resolve the target project.
const workdir = assets.functionsDir.replace(/\/functions$/, "").replace(/\/supabase$/, "");
const args = ["--yes", "supabase", "functions", "deploy", ef];
// `--use-api`: bundle + deploy via the Supabase Management API instead of the local
// Docker bundler. The Docker bundler bind-mounts the function source dir into a
// container; when the npm package is installed under a path Docker Desktop won't share
// (e.g. /usr/local — not on its default file-sharing allowlist), the mount is empty and
// every function fails with "entrypoint path does not exist" (issue #84). The API path
// is Docker-independent (it's the same fallback the CLI uses when Docker is off) and is
// the right path for an end-user deploying to their cloud Supabase — no local Docker
// bundler needed. Requires a reasonably current Supabase CLI (we resolve latest via npx).
const args = ["--yes", "supabase", "functions", "deploy", ef, "--use-api"];
if (projectRef) args.push("--project-ref", projectRef);
const r = spawnSync("npx", args, {
encoding: "utf8",
Expand Down
Loading