it-at-m / refarch

Collection of different ready to use reference architecture (RefArch) components developed by it@M.
https://opensource.muenchen.de/in-house-development.html
MIT License
2 stars 2 forks source link

Bug/stack rm container names and restart policy #199

Closed simonhir closed 1 week ago

simonhir commented 1 week ago

Description

Reference

Issue https://github.com/it-at-m/refarch-templates/issues/309

devtobi commented 1 week ago

Does this PR relate to any issue? If yes, please link it.

simonhir commented 1 week ago

Don't understand why it is colliding when using different stack names.

You can i try it out, it just is that way. In my opinion that's because docker just runs each docker-compose container also as normal container, and therefore pinned container names can collide. Also i see absolutely no advantage in doing this.

devtobi commented 1 week ago

In my opinion that's because docker just runs each docker-compose container also as normal container, and therefore pinned container names can collide. Also i see absolutely no advantage in doing this.

But does this mean a completely new set of containers with new volumes is created everytime I start up the stack? This would bloat the local machine, right? If not using named containers, maybe we should use named volumes to only store data once (of course separate to refarch-templates stack)?

simonhir commented 1 week ago

But does this mean a completely new set of containers with new volumes is created everytime I start up the stack?

No this just fixes the collisions and the containers get a number suffix

devtobi commented 1 week ago

But does this mean a completely new set of containers with new volumes is created everytime I start up the stack?

No this just fixes the collisions and the containers get a number suffix

Ok as long this suffix is static and does not auto increment thats fine for me. Other solution would be to just rename the container names for this scenario, right?

simonhir commented 1 week ago

Other solution would be to just rename the container names for this scenario, right?

Yes but why working around a feature docker-compose brings by default. I think defining the name is just bad practice if not explicitly needed for something, even if i don't know what that could be.

devtobi commented 1 week ago

Other solution would be to just rename the container names for this scenario, right?

Yes but why working around a feature docker-compose brings by default. I think defining the name is just bad practice if not explicitly needed for something, even if i don't know what that could be.

So that would mean this change would be relevant to https://github.com/it-at-m/refarch-templates as well, right? Please open a PR there too. :)

simonhir commented 1 week ago

https://github.com/it-at-m/refarch-templates/pull/397