I have 2 separate Laravel projects configured to use a common database.
Reasons are mostly related to separating concerns:
- project A is related to handling the core tables via REST APIs;
- project B reads the core tables and operates on another set of tables by using jobs/queues/etc...
I'm using DDEV for local environment and I'm struggling to find a solution to share a single db instance between the two projects.
I want to be able to run ddev start from project A OR project B and have a single reference for the db container, as well as run both projects together at the same time.
Is that even possible with DDEV, maybe with a docker-compose.db-override.yaml on project B?
Other SO questions didn't help me that much... Thank you
This is very easy to do and is documented in the DDEV FAQ: