How you manage different projects with docker-compose ?

Hi,

I usually work on many different projects at the same time.

Each project is different and each of them has own docker-compose file.
The containers have different names (projectName_serviceName), but they use sometime same images.

When I back to work on another project in Phpstorm, I must stop manually all running containers, before to deploy the containers of the current project.
Otherwise I have many errors when I do not that : "Host is already in use by another container", "Port is already allocated" ...

Can PhpStorm stop the containers when I close a project or tell me how you manage this situation ?

 

Thanks,

0

There's no way to automate it apart from macros, but you can create an External Tool that would run docker-compose down and try to remember to run it before closing the project.

This one seems to be related: https://youtrack.jetbrains.com/issue/PY-41982
Also: https://youtrack.jetbrains.com/issue/IDEABKL-5622

0

请先登录再写评论。