Open olivierognn opened 6 years ago
Hi @olivierognn. Yes, it is possible to run multiple instances at the same time. You have three options:
If your server has multiple IP addresses you can bind the web ports of the different instances to the different IP addresses (see: docker-compose.yml)
Instance 1:
nginx:
image: nginx:latest
ports:
- "192.168.2.2:80:80"
- "192.168.2.2:443:443"
Instance 2:
nginx:
image: nginx:latest
ports:
- "192.168.2.3:80:80"
- "192.168.2.3:443:443"
If you don't have have multiple IP addresses available you can use different public ports - this is only a viable option for internally used shops:
Instance 1:
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
Instance 2:
nginx:
image: nginx:latest
ports:
- "6080:80"
- "60443:443"
Or can can put a reverse proxy in front of the two instances which routes the traffic based on the hostname.
In that case I would recommend to run the Nginx natively und bind the two instances to local IP addreses (e.g. 127.0.0.2, 127.0.0.3):
Instance 1:
nginx:
image: nginx:latest
ports:
- "127.0.0.2:80:80"
- "127.0.0.2:443:443"
Instance 2:
nginx:
image: nginx:latest
ports:
- "127.0.0.3:80:80"
- "127.0.0.3:443:443"
Whenever possible I would use Option 1. That's easiest to setup and maintain.
Is possible to have multiple istances of magento website on the same server? What I need to change?