Created
March 2, 2015 12:36
-
-
Save tarom/e99fa97c3916c6717baa to your computer and use it in GitHub Desktop.
Elastic Beanstalk 上で `rails console` 動かす用
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
set -xe | |
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) | |
EB_APP_DEPLOY_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir) | |
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user) | |
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir) | |
. $EB_SUPPORT_DIR/envvars | |
. $EB_SCRIPT_DIR/use-app-ruby.sh | |
cd $EB_APP_DEPLOY_DIR | |
su -s /bin/bash -c "bundle exec rails console production" $EB_APP_USER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
> sudo eb-rails-console.sh