I have deployed services using docker stack deploy in two nodes. I would like to know is there a way to specify the duration of time for which each service should run using a compose file or in some other ways (may be a using an option while deploying the stack). Basically the stack should be removed after the specified time.
Thank you in advance.