diff --git a/deploy.sh b/deploy.sh index f72260a8..a7ca48b4 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,16 +1,22 @@ #!/bin/sh -tar cf ~/www-build.tar \ +tarfile=build.tar.gz +tarpath=$TMPDIR$tarfile + +env GZIP=-9 tar -czf $tarpath \ + --disable-copyfile \ --exclude=node_modules \ - --exclude=bower_components \ --exclude=.git \ --exclude=.idea \ + --exclude=.DS_Store \ --exclude=deploy.sh \ --exclude=install.sh . +echo "build file: $tarpath" + ssh shburg.et "rm -rf art/*" -scp ~/www-build.tar shburg@37.139.6.120:~ +scp $tarpath shburg@37.139.6.120:~ scp install.sh shburg@37.139.6.120:~ -ssh shburg.et "./install.sh && rm ./install.sh" -rm ~/www-build.tar -echo "art.shburg.org deployment completed successfully" +ssh shburg.et "./install.sh" +rm $tarpath +echo "art.shlisselburg.org deployment completed successfully" diff --git a/install.sh b/install.sh index 1728f39b..b5070f36 100755 --- a/install.sh +++ b/install.sh @@ -1,10 +1,11 @@ #!/bin/sh +gunzip build.tar.gz +tar xf build.tar -C ~/art +rm build.tar + cd ~/art -tar xvf ../www-build.tar -rm ../www-build.tar -npm install --production -node_modules/bower/bin/bower install +npm install --production --loglevel error export NODE_ENV=production export PORT=18010