0

We are running a B2B business and we have a Laravel (v8) app running on AWS.

Before, I created different environments for different customer companies.

One subdomain for each customer company and running on different environment as the configuration described here:

AWS: Pointing sub-domains to different elastic beanstalk environments

In the beginning it seemed perfect. But then, managing git branches, merges and then deployments on several machines proved to be too difficult to maintain, furthermore, too expensive.

So, I decided to point all the subdomains to the same environment for production.

BUT, ALSO I don't want that data of customer companies get mixed together; I want to keep them separate, even if on the same database server.

SO, FINALLY I want that my laravel app uses a different database (on the same RDS instance) according to subdomain.

1. Does it make sense?

2. How can I do it?

Adem Tepe
  • 564
  • 5
  • 10

0 Answers0