-2
I have a project in Django that works as a web application for use in companies.
The company has 4 branches, and we have a server available.
The goal is to replicate the 4x project on the same machine, each with an isolated database. Each branch only accesses one instance, but all must be available simultaneously, and on the same machine.
I’m using NGINX to serve applications.
At this time, I have several "server" blocks aimed at different ports operating as proxy Reverse of various Django applications running on the terminal.
I copied the project folder to 4 different folders within /var/www and changed the name of the database to isolate the users and the data of each one.
At this moment, for example:
Affiliate 1 goes to: http://domain:80/
Affiliate 2 access: http://domain:90/; ...
Is there a more efficient or correct solution to make the application available? Race conditions may occur to access the database or some kind of problem running multiple instances of Django on the same machine?