You can add a .env
file in all your projects containing COMPOSE_PROJECT_NAME=somename
.
COMPOSE_PROJECT_NAME overrides the prefix used to name resources, as such all your projects will use somename_default
as their network, making it possible for services to communicate with each other as they were in the same project.
NB: You'll get warnings for "orphaned" containers created from other projects.