Skip to content

Conversation

@7ttp
Copy link
Contributor

@7ttp 7ttp commented Nov 30, 2025

when deploying edge functions with static_files configured and --use-docker is specified while docker is not running, the cli silently falls back to the native bundler. this causes static files to be ignored, since the native bundler requires the edge runtime to be installed locally for static file bundling.

without --use-docker, static files are bundled correctly. with --use-docker and docker stopped, the deploy still succeeds but the static files are missing. so the issue only appears when a user explicitly requests docker bundling but docker isn’t available.

this change adds a check that returns an explicit error when static_files is configured, --use-docker is used, and docker is unavailable, instead of silently producing an incomplete deploy.

closes #4554

@7ttp 7ttp requested a review from a team as a code owner November 30, 2025 22:24
@7ttp
Copy link
Contributor Author

7ttp commented Nov 30, 2025

@sweatybridge Please review, when available!

@sweatybridge
Copy link
Contributor

Deploying static files in non-docker mode is supported. Can you reproduce the issue and verify?

@7ttp
Copy link
Contributor Author

7ttp commented Dec 1, 2025

Deploying static files in non-docker mode is supported. Can you reproduce the issue and verify?

Thanks for the review @sweatybridge !! retested with the correct paths:

  • Without --use-docker: static files bundled correctly
  • With --use-docker and Docker stopped: deploy succeeds but static files are missing

So the problem is specifically when a user explicitly requests Docker bundling but Docker isn’t available. The current behaviour silently produces an incomplete deploy. This PR makes that failure explicit by returning an error when --use-docker is specified, Docker isn't running, and static_files is configured.

@7ttp 7ttp changed the title fix: return error when deploying functions with static files without docker fix: throw error when static_files are used with --use-docker but Docker isn't running Dec 1, 2025
@sweatybridge
Copy link
Contributor

With --use-docker and Docker stopped: deploy succeeds but static files are missing

This code path falls back to deploy using API, which is the same as running supabase functions deploy --use-api.

If static files don't work with --use-api flag, we should find the bug and fix it. Because as I said, this is a supported feature.

Copy link
Contributor

@sweatybridge sweatybridge left a comment

Choose a reason for hiding this comment

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

blocking until further investigation

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.

static_files ignored when deploying without docker

2 participants