-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restart next server in start command
- Loading branch information
1 parent
c4d1356
commit e429472
Showing
6 changed files
with
57 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ source ~/.bashrc | |
|
||
cd "${ROOT}/next" | ||
|
||
APP_ENV=${APP_ENV} yarn build:preview | ||
yarn build:preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT=${TUGBOAT_ROOT:-${DDEV_APPROOT:-/var/www/html}} | ||
if [ -n "${IS_DDEV_PROJECT}" ]; then | ||
APP_ENV="local" | ||
elif [ -n "${TUGBOAT_ROOT}" ]; then | ||
APP_ENV="tugboat" | ||
else | ||
APP_ENV="tugboat" | ||
fi | ||
|
||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" | ||
source ~/.bashrc | ||
|
||
cd next | ||
cd ${ROOT}/next | ||
|
||
# Kill any current running server. | ||
# We can look for "/scripts/yarn/start.js" since that is what "yarn start" runs. | ||
NEXT_SERVER_PIDS=$(ps aux | grep '[.]/scripts/yarn/start.js' | awk '{print $2}') | ||
|
||
# Start the dev server. Vets-website assets will be available to the preview server after content-build builds them. | ||
# APP_ENV=tugboat yarn dev | ||
# In case we have multiple processes, loop through them. | ||
for pid in ${NEXT_SERVER_PIDS}; do | ||
kill $pid | ||
done | ||
|
||
# Start the dev server. Vets-website assets need to be in place prior to this build. | ||
APP_ENV=tugboat yarn start | ||
yarn start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters