riverqueue / riverui

A web interface for River, fast and reliable background jobs in Go.
https://ui.riverqueue.com/
Mozilla Public License 2.0
102 stars 11 forks source link

multi-tenancy & nonstandard schema #96

Open elee1766 opened 1 month ago

elee1766 commented 1 month ago

would you be open to MR which supported multi-tenancy?

we have 20+ tenants per environment, and it would be really nice to just connect to all databases in one ui, and then switch between them within the app, instead of host 20 instances of the ui

i imagine something like you say #3 here would work best

{
    "prod": "postgres://.../prod?search_path=river0",
    "staging": "postgres://.../staging?search_path=river0"
}

with the name being encoded into the url. the schema should be declared as a search parameter in that url, so nothing special needs to be done i think for schema.

currently riverui doesn't even work for us since we use a non-standard schema. (although maybe i am using the wrong parameter to set it?)

brandur commented 1 month ago

Seems plausible to one day support multi-tenancy. That's what #3 is really.

currently riverui doesn't even work for us since we use a non-standard schema. (although maybe i am using the wrong parameter to set it?)

It doesn't work even with a search_path in the database URL?

elee1766 commented 1 month ago

Seems plausible to one day support multi-tenancy. That's what #3 is really.

currently riverui doesn't even work for us since we use a non-standard schema. (although maybe i am using the wrong parameter to set it?)

It doesn't work even with a search_path in the database URL?

mmmmm search_path not working; actually this is my bad (error with bouncer config). it works locally. i'll debug more but its' probably my fault