hercules-ci / arion

Run docker-compose with help from Nix/NixOS
Apache License 2.0
622 stars 48 forks source link

Is there a way to create the service but not start it? #252

Open sweenu opened 2 months ago

sweenu commented 2 months ago

My use case is for game servers. I want the service to be present, but I want to start and stop the service manually when needed, and not have it start every time I deploy my config.

Is there a way to do that? Otherwise, this is a feature request.

roberth commented 2 months ago

It seems that this is achieved with "Profiles" in Docker Compose, which seems like a simple feature that's easy to support by adding an option for the profiles field.

roberth commented 2 months ago

More prosaic explanation of the feature: https://docs.docker.com/compose/compose-file/15-profiles/

sweenu commented 2 months ago

That's good to now! That would work for my usecase indeed. Just to be sure, this can't be done currently right ? I can use dcoker-compose.raw but there is no services.<name>.service.raw. Am I missing a way to still do it ?

sweenu commented 2 months ago

I also found out that docker-compose has a --no-start option. Could I pass that somehow ? Didn't find the infos.