It sounds like you want to use a unstoppable oneshot service. What are my options, to create a configuration that checks all boxes? What I need is the ability to start this service multiple times and have ExecStart run each time without ExecStop being run after each ExecStart. If I set RemainAfterExit=false, then the ExecStop command runs just after ExecStart, which is obviously not desirable. Since the unit is already running, it just ignores my command. The current unit configuration however doesn't give me the possibility to run systemctl start TscDocker again and have the affected containers recreated. What I mean is, if I edit the docker-compose.yml and run the docker-compose up -d command, only the affected containers are recreated, instead of all of them. What's missing - and what this question is about - is the ability to restart only some containers. If I start this service, the containers come up and go down if I stop it. It looks like this: ĮxecStart=/usr/bin/docker-compose up -d -remove-orphans I have a systemd unit, that uses the command docker-compose to start and stop a given set of containers.
0 Comments
Leave a Reply. |