update deploy script
This commit is contained in:
parent
75e37f879b
commit
62ab267d00
|
@ -10,13 +10,13 @@ if [ -z $1 ]; then
|
|||
fail
|
||||
elif [ $1 = "main" ]; then
|
||||
REMOTE="hollie"
|
||||
REMOTE_DIR="/home/lila"
|
||||
REMOTE_DIR="/home/lila4"
|
||||
elif [ $1 = "ai" ]; then
|
||||
REMOTE="cook"
|
||||
REMOTE_DIR="/home/lila"
|
||||
REMOTE_DIR="/home/lila4"
|
||||
elif [ $1 = "local" ]; then
|
||||
REMOTE="localhost"
|
||||
REMOTE_DIR="/tmp/"
|
||||
REMOTE_DIR="/tmp/lila4"
|
||||
else
|
||||
fail
|
||||
fi
|
||||
|
@ -27,19 +27,11 @@ APP_NAME=lila-4.0
|
|||
|
||||
bin/closure
|
||||
|
||||
bin/play dist
|
||||
bin/play compile stage
|
||||
if [ $? != 0 ]; then
|
||||
lilalog "Deploy canceled"
|
||||
exit 1
|
||||
fi
|
||||
cd dist
|
||||
rm -rf $APP_NAME
|
||||
unzip $APP_NAME.zip
|
||||
chmod +x $APP_NAME/start
|
||||
cd ..
|
||||
|
||||
echo "NOT deploying"
|
||||
exit 1
|
||||
|
||||
RSYNC_OPTIONS=" \
|
||||
--archive \
|
||||
|
@ -48,16 +40,16 @@ RSYNC_OPTIONS=" \
|
|||
--progress \
|
||||
--compress \
|
||||
--checksum \
|
||||
--exclude local.conf \
|
||||
--exclude application.conf \
|
||||
--exclude logs \
|
||||
--exclude RUNNING_PID \
|
||||
--exclude bin/.translate_version";
|
||||
|
||||
lilalog "Rsync scripts, binaries and assets"
|
||||
rsync $RSYNC_OPTIONS bin dist/$APP_NAME/* public $REMOTE:$REMOTE_DIR
|
||||
rsync $RSYNC_OPTIONS bin target public $REMOTE:$REMOTE_DIR
|
||||
|
||||
lilalog "Restart lila"
|
||||
ssh $REMOTE "service lila restart"
|
||||
lilalog "Restart lila4"
|
||||
ssh $REMOTE "service lila4 restart"
|
||||
|
||||
lilalog "Deploy complete"
|
||||
|
||||
|
|
Loading…
Reference in a new issue