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

Cloud databases #30

Open
maxdzin opened this issue Jun 19, 2024 · 5 comments
Open

Cloud databases #30

maxdzin opened this issue Jun 19, 2024 · 5 comments

Comments

@maxdzin
Copy link

maxdzin commented Jun 19, 2024

Greetings!

Is it possible to make this module work with EdgeDB cloud? If so, can you explain how exactly?

Thank you!

@Tahul
Copy link
Owner

Tahul commented Jun 20, 2024

Hello there :)

It sure is, you can take advantage of env variables to do so.

From EdgeDB Cloud, you should be provided with a DSN to use, you can use that in development, or use a local instance in develpment and use that Cloud DSN in production.

@maxdzin
Copy link
Author

maxdzin commented Jul 1, 2024

Hi!
Thank you for your response. I haven't had enough time yet to take a look at that, but will check it out soon.
Thank you!

@maxdzin maxdzin closed this as completed Aug 29, 2024
@watzon
Copy link

watzon commented Aug 30, 2024

EdgeDB Cloud doesn't supply DSN information. Instead they give you a secret key and expect you to use the CLI. I've been trying to debug why this doesn't work properly in Vercel and from what I can tell the CLI isn't being installed in the environment in Vercel so even though I'm providing the EDGEDB_INSTANCE and EDGEDB_SECRET_KEY env vars it still doesn't work.

Searching the code, the installCli configuration option doesn't appear to actually do anything?

@maxdzin maxdzin reopened this Aug 30, 2024
@maxdzin
Copy link
Author

maxdzin commented Aug 30, 2024

Yes, I tried yesterday to use the EdgeDB created in Vercel and connect the application using the provided credentials, but no success so far.
Also, I haven't found any clear documentation on how to get this to work.

@watzon
Copy link

watzon commented Aug 30, 2024

From what I can see from the code for this repo, it expects the edgedb cli to be available, and if it is it tries to make use of that. What I think it needs to do after that is check for the environment variables EDGEDB_INSTANCE and EDGEDB_SECRET_KEY and attempt to connect with the cloud that way, otherwise it should continue to fallback to the DSN.

The EdgeDB docs have Vercel working out of the box because the official EdgeDB JavaScript SDK looks for those env vars when it makes the connection. This just needs to do the same.

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

3 participants