dub icon indicating copy to clipboard operation
dub copied to clipboard

Is that any way to self host using docker?

Open BhautikChudasama opened this issue 1 year ago • 27 comments

Is that any way (or future) plan for hosting using docker?

BhautikChudasama avatar Sep 23 '22 15:09 BhautikChudasama

Seems like a lot of folks are interested in this: https://github.com/steven-tey/dub/issues/12

To be completely honest I'm not very familiar with docker – if someone can PR this option into a branch (i.e. docker) I'm more than happy to feature it in the README as one of the self-hosted options :)

steven-tey avatar Sep 26 '22 01:09 steven-tey

Can you specify environment variables needed to run / What services must run in order to run dub.sh?

BhautikChudasama avatar Sep 26 '22 02:09 BhautikChudasama

Got it from .env.example.

BhautikChudasama avatar Sep 26 '22 03:09 BhautikChudasama

Im busy with adding a self-host option with docker in a wip branch:

  • https://github.com/ruanbekker/dub/tree/docker
docker-compose up -d --build

Then access in port 3000:

image

Atm getting a error:

dub-app      | Error [TypeError]: fetch failed
dub-app      |     at Object.processResponse (evalmachine.<anonymous>:3163:27)
dub-app      |     at <unknown> (evalmachine.<anonymous>:3507:42)
dub-app      |     at <unknown> (internal/process/task_queues.js:141:7)
dub-app      |     at AsyncResource.runInAsyncScope (async_hooks.js:197:9)
dub-app      |     at AsyncResource.runMicrotask (internal/process/task_queues.js:138:8)

This might perhaps be due to the use of Upstash. Will look into it tomorrow again

ruanbekker avatar Sep 26 '22 23:09 ruanbekker

Just wanted to follow up and say that I haven't forgotten about this issue yet – it's top on my TODO list for this week! Sorry again for the delay 😅

steven-tey avatar Oct 10 '22 16:10 steven-tey

Is this still in the cards, or not a high priority atm?

IzMichael avatar Nov 04 '22 11:11 IzMichael

I can help with the docker setup after I'm done with my setup. I've started with a self hosted setup on vercel. Have been able to sort out all issues. Just that how do I set the app.DOMAIN.vercel.app to point to dub.sh?

Currently all the links on the home page point to dub.sh like for eg. the login page. What I'm not sure about is how to configure my own subdomain(for eg. app.DOMAIN.com) with dub.sh.

@steven-tey any idea on this?

ps-89 avatar Nov 04 '22 11:11 ps-89

@IzMichael yes it's definitely still in the cards, apologies for the delay, I was busy with Next.js Conf + a few other updates for Dub the last couple of weeks. Will get to this as soon as I can!

@ps-89 we'll probably need to turn all instances of dub.sh into a modular process.env.MAIN_DOMAIN, which should be possible by doing a search and replace all inside VSCode!

steven-tey avatar Nov 06 '22 02:11 steven-tey

@steven-tey I can raise a PR for this if you want(will help other folks with self set up)

Also, any plans to have a community slack/discord?

ps-89 avatar Nov 06 '22 10:11 ps-89

@ps-89 That would be amazing – I'm also trying to think of a way to modularize away all the unnecessary stuff (e.g. landing page, Stripe integration), if y'all have any ideas I'm all ears! One way to do this is with Next.js 13's route groups 👀

As for community Slack/Discord, I'm thinking of trying out Threads instead, but might stick to Discord depending if it works out well with an OSS model. Will keep y'all posted!

steven-tey avatar Nov 06 '22 20:11 steven-tey

@steven-tey Sure will raise a couple of PRs to start fixing a few things. I made a fork(via deploy on vercel button...not exactly a fork) and made it run on vercel but that required quite a few tweaks here and there. Will raise a PR to merge it into this repo.

We can try threads or slack or discord, whatever folks have a low barrier to entry and less context switch in using. Also, whichever is free and/or cheap. Primary reason is to ideate over a comms platform and perhaps fix few issues us(and others) are or might be facing. Let's set it up.

ps-89 avatar Nov 07 '22 10:11 ps-89

@ps-89 here you go: https://dub.sh/slack

It's by no means polished yet but feel free to join! :)

steven-tey avatar Nov 07 '22 22:11 steven-tey

@steven-tey I guess it needs elegance.co email. And I tried with Google login, but didn't work.

Don’t have an @elegance.co email address?
Contact the workspace administrator at Dub for an invitation.

I've DMed you my email for slack on your twitter.

ps-89 avatar Nov 08 '22 04:11 ps-89

@ps-89 Oh weird, sorry about that! I just updated the link – can you try again?=

steven-tey avatar Nov 08 '22 04:11 steven-tey