Closed avidsapp closed 5 years ago
Hello @avidsapp,
Try the following:
remove the db service and dependecy from the composer example
rename the service for the cotnainer
put this container new wp container in the same network of the db you want to connect
set the access details
change the database name or prefix
and fire it up!
It should work like a charm!
Hi @evertramos. Thanks for the walkthrough. I have actually decided to do a multisite instead, but may return to this if needed.
I have successfully set up separate WordPress installs without changing the service names in the docker-compose.yml as referenced by #24, but rather installing in subdomains with different container names for WP and the db and housing the sites in separate directories. This spins up separate db containers. Now I want to be able to share an already running database container, but create a new WP container. How can I accomplish this?
with .env showing:
outputs
After connecting to a shared database, I can edit the WP install itself.