-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
➖ Remove forever.js from the Dockerfile
- Loading branch information
1 parent
c0c8751
commit b35f942
Showing
2 changed files
with
2 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,3 @@ | ||
#!/bin/ash | ||
#!/bin/sh | ||
|
||
export ARGV="$@" | ||
export ARGC="$#" | ||
|
||
function sigterm_handler() { | ||
echo "SIGTERM signal received." | ||
yarn forever stopall | ||
} | ||
|
||
trap "sigterm_handler; exit" TERM | ||
|
||
function entrypoint() { | ||
if [ "$ARGC" -eq 0 ] | ||
then | ||
# Run server in cluster mode by default | ||
yarn forever start cluster.js | ||
else | ||
# Use command line arguments supplied at runtime | ||
yarn forever start $ARGV | ||
fi | ||
|
||
yarn forever --fifo logs 0 & | ||
wait | ||
} | ||
|
||
entrypoint | ||
exec node cluster.js |