Only now it seems the NGINX redirect is pointing to site1.com
So 2 questions.
How do I create a 2nd site connection to a single DB Container (Is this advised? or should each WP Container have its own DB Container?)
What am I doing wrong with the site 2 docker-compose.yml.
My scenario is a situation where I have site1.com and mariadb already running and I want to add an additional site to the server not starting from scratch. I believe in the scenario above you replied with it would simply add 2 sites from the start which helps but i know down the line id like to add/remove sites adhoc without taking down existing sites.
Deploying changes
When you make changes to your app code, you’ll need to rebuild your image and recreate your app’s containers. To redeploy a service called web, you would use:
$ docker-compose build web
$ docker-compose up --no-deps -d web
This will first rebuild the image for web and then stop, destroy, and recreate just the web service. The --no-deps flag prevents Compose from also recreating any services which web depends on.
So while I get that scenario as well I still dont think that exactly takes into consideration an additional container rather it appears its a change to an existing one.
Issue I see happening here is by redeploying or “Deploying Changes” site1 has a high probability of data loss and being reset back to a default WP build.
Think of this as a webhost company. In January I have 2 websites, Feb I need to add 1 more. I cant take down the all the websites to add additional ones each time I get new clients. They would face downtime and potential data loss each time I take on a new site.
Anything im missing here? Am I going about this the wrong way?