mirror of
/repos/Prototyper.git
synced 2026-02-27 16:12:00 +01:00
add deployit
This commit is contained in:
18
deployit
18
deployit
@@ -1,3 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
fleet-deploy && fleet-exec -- npm --cache-min=99999 install && fleet-exec npm rebuild bson && fleet-spawn npm start
|
||||
command -v fleet
|
||||
fleet_installed=$?
|
||||
if [ ${fleet_installed} == 1 ]; then
|
||||
npm install -g http://github.com/aikomastboom/fleet/archive/0.1.8.tar.gz
|
||||
fi
|
||||
|
||||
# deploy new commit
|
||||
fleet-deploy && fleet-exec -- npm --cache-min=99999 install && fleet-exec -- npm rebuild bson
|
||||
|
||||
# stop running one
|
||||
# stop running
|
||||
PROTOTYPER=$(basename $PWD)
|
||||
fleet-ps | grep -B 2 "${PROTOTYPER}/" | grep pid | cut -d " " -f 2 | xargs fleet-stop
|
||||
|
||||
# start new
|
||||
# not using 'npm start' because when killed it doesn't kill its children (server.js)
|
||||
fleet-spawn node ./server.js
|
||||
|
||||
Reference in New Issue
Block a user