Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supabase gen types --db-url Fails Without Docker Desktop #2536

Closed
istarkov opened this issue Jul 19, 2024 · 3 comments
Closed

Supabase gen types --db-url Fails Without Docker Desktop #2536

istarkov opened this issue Jul 19, 2024 · 3 comments

Comments

@istarkov
Copy link

Runneing the following command

npx supabase gen types --lang=typescript --db-url postgresql://postgres:pass@localhost/webstudio

produces the error message: Docker Desktop is a prerequisite for local development. Follow the official docs to install: https://docs.docker.com/desktop

To Reproduce

npx supabase gen types --lang=typescript --db-url postgresql://postgres:pass@localhost/webstudio

Expected behavior
I am not using any Supabase services to generate types. Installing Docker for type generation seems unnecessary.

@sweatybridge
Copy link
Contributor

sweatybridge commented Jul 24, 2024

Are you generating types for local database or a remote project? It seems like local from your comment but starting a local database relies on docker anyway so I'm confused why you can't use docker for type generation.

If you are generating for a remote project, you can use npx supabase gen types --lang=typescript --project-id <your-project-ref> which doesn't rely on docker.

@sweatybridge sweatybridge closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
@istarkov
Copy link
Author

I am using the cli for https://github.com/supabase/postgrest-js, which can operate independently of Supabase dependencies. This means it doesn’t require the entire Supabase stack to be installed via Docker.

In my setup, the entire environment is placed inside a devcontainer, which is essentially a Docker container without internal Docker support. When a CLI tool depends on Docker, it often results in a substantial download of several gigabytes of various images. This can be quite costly in some locations. It would be greatly appreciated if the CLI could provide an estimate of the data it will download, especially for one-time executions.

@sweatybridge
Copy link
Contributor

sweatybridge commented Jul 24, 2024

When a CLI tool depends on Docker, it often results in a substantial download of several gigabytes of various images. This can be quite costly in some locations. It would be greatly appreciated if the CLI could provide an estimate of the data it will download, especially for one-time executions.

That's a good idea. What I will probably do is to add series of prompts when running supabase init for services that users actually want. If you don't need any services, they can also be disabled via supabase/config.toml. That would save a lot of time / data by not downloading potentially unused images.

tracked here #2551

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

No branches or pull requests

2 participants