Skip to content

Instantly share code, notes, and snippets.

Created February 7, 2016 03:56
What would you like to do? - リリースパッケージをアプリケーションサーバーにホットデプロイする
set -ex
export AWS_DEFAULT_REGION="ap-northeast-1"
MYIP="`dig +short`"
cd $(dirname $(readlink -f $0))
trap "aws ec2 revoke-security-group-ingress --group-id ${SGID} --protocol tcp --port 22 --cidr ${MYIP}/32" 0 1 2 3 15
aws ec2 authorize-security-group-ingress --group-id ${SGID} --protocol tcp --port 22 --cidr ${MYIP}/32
cd ../deploy && ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment