Skip to content

Instantly share code, notes, and snippets.

@seratch
Created November 8, 2012 09:38
Show Gist options
  • Save seratch/4037781 to your computer and use it in GitHub Desktop.
Save seratch/4037781 to your computer and use it in GitHub Desktop.
Deploying a Sinatra Application to AWS Elastic Beanstalk
# http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html
wget https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.2.zip
unzip AWS-ElasticBeanstalk-CLI-2.2.zip
mkdir eb_ruby
cd eb_ruby
echo "require './helloworld'
run Sinatra::Application" > config.ru
echo "require 'sinatra'
get '/' do
'Hello World!'
end" > helloworld.rb
echo "source 'http://rubygems.org'
gem 'sinatra'" > Gemfile
git init
../AWS-ElasticBeanstalk-CLI-2.2/eb/macosx/python2.7/eb init
../AWS-ElasticBeanstalk-CLI-2.2/eb/macosx/python2.7/eb start
git add .
git commit -m "update Sinatra app"
git aws.push
../AWS-ElasticBeanstalk-CLI-2.2/eb/macosx/python2.7/eb update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment