cloudflare / cloudflare/containers

Hyperdrive doesn’t work inside Cloudflare Containers

Open
#97 8 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
270
Forks
42
Avg merge
1d 5h
Merged PRs (30d)
4

Description

Hey folks!

I’ve been playing around with Cloudflare Containers and ran into something I couldn’t quite figure out... Ok, I concede, I’m not just playing. I’m too early of an adopter and actually running it in production for a multi-million daily hits Worker powering… stateless WordPress. Yep, WordPress, you read that right. You only live once, after all.

I tried wiring up [Hyperdrive](https://developers.cloudflare.com/hyperdrive/) inside a container by passing the connection string through env vars, something like:

```ts
envVars = {
DB_CONN_STRING: env.HYPERDRIVE.connectionString
}
```

…but the container just fails to connect.

So I’m wondering:

* Am I missing something obvious in setup/usage?
* Or is this just not supported in containers yet?
* If it’s a limitation, is support for Hyperdrive inside containers on the roadmap?

Would be great to know if I should keep digging or just accept that Hyperdrive + containers isn’t a thing (yet).

Thanks for the awesome work on this project!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.