Skip to content

Instantly share code, notes, and snippets.

@yuuki
Last active September 6, 2016 15:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yuuki/5e3f1ed205f29cb159c1069ac433dda5 to your computer and use it in GitHub Desktop.
Save yuuki/5e3f1ed205f29cb159c1069ac433dda5 to your computer and use it in GitHub Desktop.
ISUCON deploy.sh
#!/bin/bash
set -ex
IPADDR=$1
USERNAME=$USER
ssh isucon@$IPADDR "/home/isucon/notify.sh $USERNAME 'deploying...' && cd /home/isucon/deploy && git pull && ~/.local/perl/bin/carton install && sudo systemctl restart mysql && sudo service memcached restart && sudo systemctl restart isuxi.perl && sudo systemctl restart nginx && sudo sysctl -p && /home/isucon/notify.sh $USERNAME 'deploy done'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment