Created
April 24, 2014 20:33
-
-
Save rjocoleman/11268563 to your computer and use it in GitHub Desktop.
Capistrano Slug basic config. Assumes that the AMI being launched includes webserver and directory set up already. With this config after Capistrano deploys it will take an archive of the current application directory. Use `user_data.sh` when starting your EC2 instance and it'll download the latest slug and extract it - assuming the rest of the …
This file contains 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 :application, 'foo-application' | |
set :deploy_to, '/var/www/foo-application' | |
set :slug_s3_bucket, 'capistrano-slug-bucket' | |
after 'deploy:finished', 'slug' |
This file contains 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
#!/bin/bash | |
aws s3 cp s3://capistrano-slug-bucket/foo-application-slug.tar.gz /tmp/foo-application-slug.tar.gz | |
tar zxf /tmp/foo-application-slug.tar.gz -C /var/www/foo-application | |
rm /tmp/foo-application-slug.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment