Last active
February 17, 2017 10:30
-
-
Save mikong/15b446428ef1425c6b89fe5b2006603e to your computer and use it in GitHub Desktop.
The erb template for /engineyard/bin/app_chat_node
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
#!/bin/bash | |
# Author: Mikong Galero | |
/data/<%= @app_name %>/shared/bin/build_node_app_environment | |
source /data/<%= @app_name %>/shared/config/env | |
source /data/<%= @app_name %>/shared/config/env.custom | |
case "$1" in | |
status) | |
pm2 show ${application} | |
;; | |
start) | |
pm2 start ${current_path}/app.js --name="${application}" | |
;; | |
stop) | |
pm2 stop ${application} | |
;; | |
reload) | |
pm2 reload ${application} | |
;; | |
deploy) | |
pm2 reload ${application} | |
;; | |
restart) | |
pm2 reload ${application} | |
;; | |
*) | |
echo "Usage: $0 {status|start|stop|reload|restart|deploy}" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment