cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.61k stars 262 forks source link

`processes down` doesn't stop processes #1210

Closed shishkin closed 4 days ago

shishkin commented 2 weeks ago

Describe the bug I have a process defined via processes.{name}.exec. When I run it with devenv up -d and then do devenv processes down it keeps running.

To reproduce

Snippet from devenv.nix:

  processes.my_container = {
    exec = "docker run --rm --name my_container my_container";
    process-compose = {
      shutdown.command = "docker stop my_container";
    };

Run with devenv up -d then devenv processes down.

See container still running with docker ps

Version

devenv 1.0.5 (aarch64-darwin)

sandydoo commented 1 week ago

@shishkin, I tested this with the nginx image and the container shut down correctly. The only time it fails to do so is if I run docker run with the -d detached flag and keep process_compose.is_daemon = false. Could there be something else to this?

shishkin commented 4 days ago

Hmm... Now it stops in my environment as well. Never mind, maybe I didn't wait long enough as the process command tend to exit before the process stops.