Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devenv up -d (detach) argument does not work #1159

Closed
noverby opened this issue Apr 22, 2024 · 6 comments
Closed

devenv up -d (detach) argument does not work #1159

noverby opened this issue Apr 22, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@noverby
Copy link

noverby commented Apr 22, 2024

According to https://devenv.sh/services, devenv up support detaching with the -d argument,
but the argument does nothing, and it is not documented either with --help, that it is an available option.

@noverby noverby added the bug Something isn't working label Apr 22, 2024
@domenkozar
Copy link
Member

Are you using flakes?

❯ devenv up --help
Start processes in the foreground. https://devenv.sh/processes/

Usage: devenv up [OPTIONS] [PROCESS]

Arguments:
  [PROCESS]  Start a specific process.

Options:
  -d, --detach  Start processes in the background.
  -h, --help    Print help

@noverby
Copy link
Author

noverby commented Apr 22, 2024

Yes, using inputs:

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    git-hooks = {
      url = "github:cachix/git-hooks.nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    devenv = {
      url = "github:cachix/devenv";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.pre-commit-hooks.follows = "git-hooks";
    };
  };

I'm getting the output:

❯ devenv up --help
{"level":"warn","error":"open /home/noverby/.config/process-compose/settings.yaml: no such file or directory","time":"2024-04-22T11:17:29+02:00","message":"Error reading settings file /home/noverby/.config/process-compose/settings.yaml"}
Run all the process compose processes.
If one or more process names are passed as arguments,
will start them and their dependencies only

Usage:
  process-compose up [PROCESS...] [flags]

Flags:
  -f, --config stringArray      path to config files to load (env: PC_CONFIG_FILES)
  -h, --help                    help for up
  -d, --hide-disabled           hide disabled processes
  -n, --namespace stringArray   run only specified namespaces (default all)
      --no-deps                 don't start dependent processes
  -r, --ref-rate int            TUI refresh rate in seconds (default 1)
  -R, --reverse                 sort in reverse order
  -S, --sort string             sort column name. legal values (case insensitive): [AGE, EXIT, HEALTH, NAME, NAMESPACE, PID, RESTARTS, STATUS] (default "NAME")
      --theme string            select process compose theme (default "Default")
  -t, --tui                     enable TUI (-t=false) (env: PC_DISABLE_TUI) (default true)

Global Flags:
      --keep-tui             keep TUI running even after all processes exit
  -L, --log-file string      Specify the log file path (env: PC_LOG_FILE) (default "/tmp/nix-shell.o1NNhj/process-compose-noverby.log")

@noverby
Copy link
Author

noverby commented Apr 22, 2024

Oh, just noticed that we are using the workaround provided by #756, so that is probably why it doesn't support --detach:

packages.devenv-up = {stdenv}: self.devShells.${stdenv.system}.default.config.procfileScript;

@domenkozar
Copy link
Member

Yeah if you'd like to use -d you have to use devenv cli.

@noverby
Copy link
Author

noverby commented May 4, 2024

For ref: process-compose issue to add support for --detach argument: F1bonacc1/process-compose#169

@bachirelkhoury
Copy link

Is there any way to launch process-compose and mange services after launching with -d?

@noverby noverby closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants