Re: [Ur] Multitenancy

2018-05-13 Thread Artyom Shalkhakov
Hi Simon, As others have said, it's better not to touch the application code for multi-tenancy. 2018-05-14 0:02 GMT+06:00 Simon Van Casteren : > Thanks everybody for the help. I was running my exe in standalone mode, so > I didn't realise when you're running in

Re: [Ur] Multitenancy

2018-05-13 Thread Adam Chlipala
Right, that all makes sense.  It should be easy to set up a shell script from first principles, with no particular support from Ur/Web.  Then calling that shell script from an Ur/Web app with the C FFI should also be straightforward -- just be sure to register the execution of the script as a

Re: [Ur] Multitenancy

2018-05-13 Thread Simon Van Casteren
Thanks everybody for the help. I was running my exe in standalone mode, so I didn't realise when you're running in fastCGI mode that Nginx will start processes for you. As I said, I don't have any frame of reference so I ask silly questions :). As I see it now, I'll probably have an API endpoint

Re: [Ur] Multitenancy

2018-05-13 Thread Adam Chlipala
I'm not sure which aspect of deployment you're worried about.  With Apache, you can configure as many FastCGI applications as you'd like, and they will all be started automatically on each reboot.  It only takes a few lines of configuration per application.  Similarly, creating a new database

Re: [Ur] Multitenancy

2018-05-13 Thread steenuil
I think that might be better handled in the server configuration, you could use the same binary but spin up different processes using a different URWEB_PQ_CON for each subdomain. Adding a new school would just be a matter of creating a new DB on postgresql and updating the server's

Re: [Ur] Multitenancy

2018-05-13 Thread Simon Van Casteren
I considered it briefly as I was doing some research on the topic. It's the first time I'll be running and deploying a SaaS app myself (I've so far always been on the programming side only) so it felt more natural to me to keep everything inside a single application. Running the application right

Re: [Ur] Multitenancy

2018-05-13 Thread Adam Chlipala
Can you explain why you don't want to run separate applications with separate databases? On 05/13/2018 05:50 AM, Simon Van Casteren wrote: Hi, I'm in the process of making a new application for music schools, using ur/web for front and backend. I'm at the point where I have two customers

Re: [Ur] Multitenancy

2018-05-13 Thread Rob Manhatton
I don't have any recommendation per say, but when github sells its public gh service, many users can buy accts at the same URL. When that level of security/ privacy doesn't meet it's customer's needs, they are able to launch a seperate instance of their web app and even store their app server