dub icon indicating copy to clipboard operation
dub copied to clipboard

Eliminate dependency on external services

Open peaklabs-dev opened this issue 1 year ago • 8 comments

  • [ ] Eliminate dependency on all external services -> let us use them if we want, but also let us use local databases and also let us deploy the server whre want not only on Vercel.

peaklabs-dev avatar Feb 04 '24 19:02 peaklabs-dev

  • [ ] Eliminate dependency on all external services -> let us use them if we want, but also let us use local databases and also let us deploy the server whre want not only on Vercel.
  1. Vercel: You can deploy to Node JS just fine, SST allows decently easy AWS deployments, and Amplify could be used, Netlify also has NextJS deployment you just have to configure some basics for using turborepo with them, you'll also have to find a CRON system to use, SST works easily but you can roll any system you'd like if you configure the Auth Bearer Token for CRON Jobs

  2. PlanetScale: you can use a MySQL DB hosted anywhere including locally with minimal change

  3. Upstash: You can swap out the base connection to a standard redis connection without much difficulty and host that anywhere, similar applies to QStash features

The only thing you lose here is domain transfers are built around Vercel DNS, no guarantees on how you'll set that up.

You'll still need outside systems for things like Cloudinary or unsplash the full list of outside env vars is:

PlansetScale DB "DATABASE_URL", Domain transfer "TEAM_ID_VERCEL", "PROJECT_ID_VERCEL", TB analytics "TINYBIRD_API_KEY", Upstash services "UPSTASH_REDIS_REST_URL", "UPSTASH_REDIS_REST_TOKEN", "RATELIMIT_UPSTASH_REDIS_REST_URL", "RATELIMIT_UPSTASH_REDIS_REST_TOKEN", "QSTASH_TOKEN", "QSTASH_CURRENT_SIGNING_KEY", "QSTASH_NEXT_SIGNING_KEY", Magic link login + other emails "RESEND_API_KEY", "RESEND_AUDIENCE_ID", Stripe for payment "STRIPE_SECRET_KEY", "STRIPE_SECRET_KEY_LIVE", "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY", "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE", OAuth "GOOGLE_CLIENT_ID", "GOOGLE_CLIENT_SECRET", "GITHUB_CLIENT_ID", "GITHUB_CLIENT_SECRET", Bitly porting "NEXT_PUBLIC_BITLY_REDIRECT_URI", "BITLY_CLIENT_SECRET", Unsplash images for OG "UNSPLASH_ACCESS_KEY", "CLOUDINARY_URL"

versecafe avatar Feb 04 '24 20:02 versecafe

How can I eliminate all external dependencies? or will this be possible along with docker hosting soon?

peaklabs-dev avatar Feb 04 '24 20:02 peaklabs-dev

@ayntk-ai you could pull all the oauth deps and roll passwords on your self hosted DB, bitly and unsplash you'd just have to loose the features same with stripe. TB could be done with a kafka pipeline, domain transfer is also just lost, Resend could be done with Nodemailer and SMTP servers if you really wanted but it's a huge hassle

versecafe avatar Feb 04 '24 20:02 versecafe

this is planned: https://dub.co/docs/self-hosting#caveats

steven-tey avatar Mar 03 '24 15:03 steven-tey

@steven-tey any idea on how to replace Tinybird, kafka + clickhouse with a small node/express/next API to glue it together to match the TB interface?

versecafe avatar Mar 04 '24 15:03 versecafe

Any news on this ?

rickylabs avatar Jun 08 '24 07:06 rickylabs

@steven-tey any updates on when we will be able to host dub without any external services just local services via docker compose?

peaklabs-dev avatar Jul 15 '24 14:07 peaklabs-dev