@baris Can you add this to the docs under "Scaling NodeBB" page? 😄
[Solved] Running two or more instances of NodeBB
mootzville last edited by mootzville
I'm wanting to run -- on occasion -- two simultaneous instances of NodeBB.
This is my git workflow, and if anyone has any suggestions on how to do it better I'd appreciate hearing about it:
- I have a local clone of NodeBB
- I create feature branches to do modifications and push back to my master.
- I push my local master to my server's testing instance: /var/www/site.test
- Once I am confident things won't break I push to production: /var/www/site.prod
However, by doing this I have to sometimes run both site.test and site.prod at the same time. Site.prod would be running all the time because that's the production site while site.test would run temporarily while I test things out.
I have two mongo databases set up: siteTest & siteProd. One for testing and one for production.
Let's say I have production running on port 80 and test running on 4567. When I have both running I can't stay logged in to either of them. Once I log in to my instance on port 80 it kicks me off my instance on port 4567 and vice versa.
I'm not actually sure if this is a bug or not, but I thought I'd throw it up in here just in case.
Any help on troubleshooting this, or suggestions of a better way to go about doing things would be much appreciated.
What I want to do is be able to test directly on my production server on a testing instance before actually pushing changes to the production site. So, if for instance, a NodeBB update gets pushed that has breaking changes, I can know about it in testing before pushing the updates to production.
Try using a subdomain for your testing environment, that shoul clear it up.
Ok, great. Thanks for the quick response. I'll post my results after...
It'd be an A record, since MX is for mail, but yeah, that's more or less it.
Ya...just kidding...wasn't thinking and just cloned my mx record for the mail server.
Ok, I can confirm this works. Thanks @julian.