Skip to content

Commit

Permalink
- use a different variable for node service in case the user separate…
Browse files Browse the repository at this point in the history
…s it from the main php service
  • Loading branch information
horuskol committed Jun 25, 2023
1 parent 0a0b18a commit 0e6e3a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/pilot
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ if [ -f ./.env ]; then
fi

export MAIN_SERVICE=${MAIN_SERVICE:-"pilot"}
export NODE_SERVICE=${NODE_SERVICE:-"pilot"}
export WWWUSER=${WWWUSER:-$UID}
export WWWGROUP=${WWWGROUP:-$(id -g)}

Expand Down Expand Up @@ -142,7 +143,7 @@ elif [ "$1" == "npm" ]; then
if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u pilot)
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=($MAIN_SERVICE "npm" "$@")
ARGS+=(NODE_SERVICE "npm" "$@")
else
services_are_not_running
fi
Expand All @@ -164,7 +165,7 @@ elif [ "$1" == "serve" ]; then
if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u pilot)
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=($MAIN_SERVICE "npm" "run" "dev")
ARGS+=($NODE_SERVICE "npm" "run" "dev")
else
services_are_not_running
fi
Expand All @@ -175,7 +176,7 @@ elif [ "$1" == "build" ]; then
if [ "$EXEC" == "yes" ]; then
ARGS+=(exec -u pilot)
[ ! -t 0 ] && ARGS+=(-T)
ARGS+=($MAIN_SERVICE "npm" "run" "build")
ARGS+=($NODE_SERVICE "npm" "run" "build")
else
services_are_not_running
fi
Expand Down

0 comments on commit 0e6e3a7

Please sign in to comment.