Hello, paid customer here for the cloud version. W...
# ask-questions
Hello, paid customer here for the cloud version. We’re investigating implementing the self-hosted version too and got a few questions 1. Can we deploy the FE under a prefixed path? if not, there should be ways with NextJS to have an env var for the basepath, any plans on supporting it ? 2. Can we deploy the FE and BE separately (ie. In 2 different containers, possibly not even deployed in the same place). This is mainly to cover a requirement that the FE should be only be accessible to internal users 3. Is having multiple replicas of the containers for high availability supported? 4. Any plans to allow for an RDBMS as an alternative to mongodb for the backend database? Thanks
Hi Massyl: 1. This is not supported currently in the docker container itself - You can by using some url redirecting or reverse proxying 2. The GrowthBook app is stateless, so as long as they share a common mongo connection, this should work fine. 3. Yes, GrowthBook scales well, as above in #2, for high availability. 4. We’ve thought about this, but it is a lot of work to support it. (You can use documentDB if you want an alternative, though)
Hi Graham Thanks for the quick response Is there some docs/samples regarding the reverse proxying? From my testing the app directly tries to send requests to
and there may also be other assets directly loaded by the FE so I don't see how the reverse proxying would work unless we know all the paths that the FE requires to function
Is there some docs/samples regarding the reverse proxying for the self-hosted option ? The goal being to send FE traffic via a prefix
I did the split based on sub domains name instead of URI prefix swizzling, which would introduce a whole host of problems if you are manipulating the URI behind the back of the app. Basically: •
resolves to the "public world IP" (DMZ) •
resolves to your internal protected VPC
I was actually hoping GB proxy would solve some of that but I don't think it does (or atleast I have not figured it out yet)
Thanks, It's trickier to go that route as one would need 2 more domain names, the associated TLS certs and making sure those are declared and configured in all WAF/reverse proxy layers one would have. So it's easier to do the prefix, the FE app just needs to know about it so links are correct, which should be a basepath config in NextJS. It has to be done before the app is built though
Ok, I'm interested to see how it goes for you. Having a wild card cert and routing based on subdomains seemed super easy... But I expect we have very different environments we work within.
I tried the "uri" prefix trick on another 3rd party app project and never want to do that again. It may be easier in this case since you can manipulate the routes code directly (I guess).