Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying using AWS CI/CI process for Ruby on Rails

Currently I can deploy my Ruby on Rails app to a pre-configured ec2 instance using Capistrano cap production deploy.

I'm trying to use CodeCommit, CodeBuild, CodeDeploy and CodePipeline.

CodePipeline Setup

I'm thinking of adding a CodeDeploy after the build passed from CodeBuild.

How can I use CodeDeploy to run a script like cap production deploy and deploy to my instance?

like image 452
AllenC Avatar asked Jun 08 '26 15:06

AllenC


1 Answers

CodeDeploy allows script execution using lifecycle hook: http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html. You can add a script that execute the command and specify the script in the ApplicationStart section of your appspec file.

like image 78
tangerini Avatar answered Jun 10 '26 07:06

tangerini



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!