Why it probably happened:
Docker Compose tracks containers by project name + service name, not by container_name
. Running docker compose up
in different folders with the same service name but different container_name
causes Compose to stop containers from the other project because it thinks they belong to the same service.
How to fix:
Use different service names in each compose file,
Or use the same service names but run with different project names via docker compose -p <project_name> up -d
Though, tell me if it's not the case.