How To Add and Configure a Second Community

Hi,

I set up Sharetribe for a high school project. I have everything set up and working properly for my first community in Sharetribe.

Now I would like to set up a second community to run on the same server. My goal is to have the first one I already set up be live at one school subdomain and the new one at another school subdomain.

I know that I can just go add the needed records to the database but how do I configure the web server to listen on each subdomain and than route the traffic to the correct community?

Does anyone have any documentation on how to do this? Using a separate S3 bucket and separate copy of the db would be great as well if possible. Thanks

hi, so it’s pretty simple actually.
Once you have modified the file in the controller: community.controller.rb at the end you have:
def communities_exist?
Rails .env.test? ? false: .count community> 0
end
end

you replace by
def communities_exist?
false
end
end
(That’s what I did)

Then it’s very simple you have nothing special to configure. You have to use the cUrl command to create a new community (search in the forum someone speaks about it)

Then for the recognition of the damage nothing more simple, it is enough to redirect your domain or subdomain on the server and to configure on nginx a configuration identical to the other community and jsute to change the domain used

in the database you will search the community and put on 1 Domain and put the used domain, for example app.mydomain.com

And that’s it, everything is managed in the same database