Linode Rails ready stack script and Capistrano database deployment setup
This morning Zac and I started a new project. It was the right time to clean a bit our server install and deployment process.
Linode stack script Rails/Passenger/Nginx readyWe've started by updating the stack script that we've been using in the past, and added some functions to it.
You can find the stack script at https://github.com/cookieshq.co.uk/linode-stackscript or on Linode stack scripts base https://manager.linode.com/stackscripts/edit/7423
It will allow you to select your Database password, SSH port, Rails env install, deploy user and ruby version (default to 2.0.0-p247)
It will install everything your expect on your server including passenger, Nginx, system wide RVM.
Once done the last thing you need to do is to configure your ~/.ssh/config file with your new Port.
Capistrano database.yml deployementThe next thing we needed was a common and easy way to deploy our database.yml file to each new project.
For that we've created a Capistrano recipe available here https://github.com/cookieshq.co.uk/capistrano-database-management-setup
Once install on your fresh project, when you will run
cap [env] deploy:setup the script will ask you for a database username, password and name and set all this to a database.yml file in your shared path.
Then on each deploy, this file will be linked to your last release config folder.
Quick and easy.
We hope it helps