Skip to content

Commit

Permalink
Merge pull request #1147 from cachix/process-compose-unix-socket
Browse files Browse the repository at this point in the history
process-compose: use unix-socket
  • Loading branch information
domenkozar authored Apr 18, 2024
2 parents d775275 + eab7aa8 commit ba8a826
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/modules/process-managers/process-compose.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ in
config = lib.mkIf cfg.enable {
processManagerCommand = ''
${cfg.package}/bin/process-compose --config ${cfg.configFile} \
--port ''${PC_HTTP_PORT:-${toString config.process.process-compose.port}} \
--unix-socket ''${PC_SOCKET_PATH:-${toString config.process.process-compose.unix-socket}} \
--tui=''${PC_TUI_ENABLED:-${toString config.process.process-compose.tui}} \
up "$@" &
-U up "$@" &
'';

packages = [ cfg.package ];
Expand Down
6 changes: 3 additions & 3 deletions src/modules/processes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ in
'';
default = {
version = "0.5";
port = 9999;
unix-socket = "${config.devenv.runtime}/pc.sock";
tui = true;
};
example = {
Expand Down Expand Up @@ -133,7 +133,7 @@ in
backgroundPID=$!
stop_up() {
down() {
echo "Stopping processes..."
kill -TERM $backgroundPID
wait $backgroundPID
Expand All @@ -142,7 +142,7 @@ in
rm -rf ${config.devenv.runtime}
}
trap stop_up SIGINT SIGTERM
trap down SIGINT SIGTERM
wait
'';
Expand Down

0 comments on commit ba8a826

Please sign in to comment.