diff --git a/bower.json b/bower.json index 908246ac..60415ec2 100644 --- a/bower.json +++ b/bower.json @@ -20,6 +20,10 @@ "tests" ], "dependencies": { - "fotorama": "~4.6.2" + "fotorama": "~4.6.2", + "jquery": "~2.1.1", + "angular-route": "~1.3.3", + "angular-animate": "~1.3.3", + "angular": "~1.3.3" } } diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 00000000..f72260a8 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +tar cf ~/www-build.tar \ + --exclude=node_modules \ + --exclude=bower_components \ + --exclude=.git \ + --exclude=.idea \ + --exclude=deploy.sh \ + --exclude=install.sh . + +ssh shburg.et "rm -rf art/*" +scp ~/www-build.tar 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" diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..1728f39b --- /dev/null +++ b/install.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +cd ~/art +tar xvf ../www-build.tar +rm ../www-build.tar +npm install --production +node_modules/bower/bin/bower install + +export NODE_ENV=production +export PORT=18010 + +#starting www +if forever restart bin/www.js; then + echo www.js restarted +else + forever start bin/www.js + echo www.js started +fi diff --git a/package.json b/package.json index 86e50701..c5cc5096 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,6 @@ "description": "", "main": "main.js", "scripts": { - "start": "node ./server.js", - "install": "gulp deploy", "test": "mocha" }, "repository": { @@ -17,6 +15,7 @@ "license": "ISC", "dependencies": { "body-parser": "^1.9.3", + "bower": "^1.3.12", "cookie-parser": "^1.3.3", "express": "^4.10.1", "instagram-node": "^0.5.1",