Shane
Shane
CDCloudflare Developers
Created by g1zmo on 11/24/2023 in #workers-help
Cloudflare Workers + Digital Ocean Managed Postgres DB
No clue why just connecting to the DB directly in the worker through an environment variable didn't work though.
10 replies
CDCloudflare Developers
Created by g1zmo on 11/24/2023 in #workers-help
Cloudflare Workers + Digital Ocean Managed Postgres DB
@g1zmo That tested out! Connecting to the digital ocean managed DB through hyperdrive worked great. npx wrangler hyperdrive create ${name} --connection-string${DO's provided connection string including the ?sslmode=require} I know I'm a little late to the game, but I was pulling my hair out on this and even if you've moved past, cloudflare syncs these discord chats to their online help docs, so maybe can help someone else down the line. The good news is, the connection pooling they offer is free, so if you don't want to incur additional expenses down the line when they start charging, just don't use query cacheing, which is what they're planning on charging for. Also, I have a digital ocean created connection pool I use for some node instances I run on DO, but I used the direct DB connection string for hyperdrive, not the connection pool string.
10 replies
CDCloudflare Developers
Created by g1zmo on 11/24/2023 in #workers-help
Cloudflare Workers + Digital Ocean Managed Postgres DB
Migrating away from Supabase, which was hosted in aws. I was using a similar connection string. The only variable is Cloudflare reaching out to digital ocean’s network.
10 replies
CDCloudflare Developers
Created by g1zmo on 11/24/2023 in #workers-help
Cloudflare Workers + Digital Ocean Managed Postgres DB
Also using a digital ocean db and although my local db client can easily connect to it, Cloudflare worker can’t. I’m going to try to create a hyperdrive connection to the db and have the worker connect to hyperdrive. Otherwise there has to be some networking issue preventing it internally in the cloud providers.
10 replies
CDCloudflare Developers
Created by g1zmo on 11/24/2023 in #workers-help
Cloudflare Workers + Digital Ocean Managed Postgres DB
@g1zmo did you ever resolve this?
10 replies