Closed Camille92 closed 7 years ago
Hello Camille¡'
to run the app concurrently multiple times in the same computer:
npm install
etc/tribeca.json
files of each and set a different MongoDbUrl
,** you can only modify the last word of the url, that is the database name to be created; one different for each app, you could have: mongodb://localhost:27017/tribeca
and for another mongodb://localhost:27017/whatevername
and mongodb://localhost:27017/tribeca69
for another appWebClientListenPort
numbers for each app so they dont collide and are all accessible.hope it helps'¡
Thanks!
I tried to do it using docker, but so far I can't get it running.
In the second dockerfile I just need to change a bit the last world of MongoDbUrl and the web client port. But do I need to run a new Mongo service or use 1 mongo for 2 tribeca ? But then I need to change that right ? ''' docker run -p 3000:3000 --link tribeca-mongo:mongo --name tribeca -d tribeca '''
Hello Camille, only 1 mongodb server in localhost can store multiple tribeca databases by giving to the databases diferent names.
The database name is defined as the last word of the MongoDbUrl
value.
The docker run line, is not setting up any database name, it is setting up docker containers linked together, and the containers happens to have the name "tribeca" and "tribeca-mongo"; do not confuse these container names in docker run line with the MongoDbUrl
database name.
So, having multiple tribecas with different MongoDbUrl values, if these are containers, you need also to give to these containers different names, lets say an example could be:
App¡ 1:
App¡ 2:
Or you can make App 2 also like:
that is, for reuse the mongo server/container and just create separated database for each app (recommeneded instead of multiple redundant mongo servers/containers)
If you have the apps in containers, all them can have the same WebClientListenPort.
Hope this helps'¡
new simplified how to at https://github.com/ctubio/tribeca#multiple-instances-party-time
Just a technical question,
I run all my tribecas each on small ec2 instances. I think it can be good to have them on the same one but I don't know how to manage that with mongo and the ports that need to be opened.