Last active
August 29, 2015 14:11
-
-
Save danlopez/dc0166fe85f39f15c4a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case $1 in | |
deploy) | |
docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \ | |
"cp /host-ssh/* /root/.ssh/ && chmod 400 /root/.ssh/* && ruby tasks/trigger_deploy_pull.rb $2" | |
;; | |
status) | |
docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \ | |
"watch -n 3 ruby tasks/container_status.rb $2" | |
;; | |
shell) | |
docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \ | |
"/bin/bash" | |
;; | |
*) | |
echo "Usage: orchestrate [deploy|status|shell] [development|staging|production]" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment