diff --git a/deps.sh b/deps.sh index 3f8b9458..06c0cbfa 100644 --- a/deps.sh +++ b/deps.sh @@ -1,8 +1,10 @@ -# Deploy key for private npm modules -mkdir -p /root/.ssh -cp deploy_key /root/.ssh/id_rsa -chmod 400 /root/.ssh/id_rsa -cp ssh_config /root/.ssh/config +if [ $NODE_ENV == 'production' ]; then + # Deploy key for private npm modules + mkdir -p /root/.ssh + cp deploy_key /root/.ssh/id_rsa + chmod 400 /root/.ssh/id_rsa + cp ssh_config /root/.ssh/config +fi # System dependencies apt-get -q update diff --git a/postinstall.sh b/postinstall.sh index 5d941574..6b4b5c50 100755 --- a/postinstall.sh +++ b/postinstall.sh @@ -1,3 +1,5 @@ -node ./node_modules/coffee-script/bin/coffee -c ./src -rm -rf /root/.ssh/* /build/app/deploy_key /app/deploy_key /build/app/Makefile /app/Makefile /app/src/*.coffee -npm uninstall coffee-script \ No newline at end of file +if [ $NODE_ENV == 'production' ]; then + node ./node_modules/coffee-script/bin/coffee -c ./src + rm -rf /root/.ssh/* /build/app/deploy_key /app/deploy_key /build/app/Makefile /app/Makefile /app/src/*.coffee + npm uninstall coffee-script +fi