Skip to content

Commit

Permalink
fix: Cannot deploy as root (closed #78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Nouguier committed Jul 2, 2019
1 parent 9cbcab1 commit 91ab3ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .travis.deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ else
scp deploy/remove-app.sh $SSH_USER@$SSH_REMOTE:~/$APP

# Deploy the stack
SUDO=""
if [ "$SSH_USER" != "root" ]; then
SUDO="sudo"
fi
ssh $SSH_USER@$SSH_REMOTE "cd $APP; chmod u+x ./remove-app.sh; chmod u+x ./deploy-app.sh"
ssh $SSH_USER@$SSH_REMOTE "cd $APP; sudo ./remove-app.sh; sudo k-swarm-prune; sudo ./deploy-app.sh"
ssh $SSH_USER@$SSH_REMOTE "cd $APP; $SUDO ./remove-app.sh; $SUDO k-swarm-prune; $SUDO ./deploy-app.sh"

travis_fold end "deploy"
fi
Expand Down

0 comments on commit 91ab3ff

Please sign in to comment.