- I want to keep it separately. Keep deploy tool in rails app it's not best idea
- I want to have independent deploy tool for many rails apps
- I want to restrict access to deploy tool in team. Juniors are shouldn't touch it.
- It's should be easy to maintain and improve
- It's should be base for branches: cap3node, cap3django, cap3php etc.
- Clone cap3rails
- Copy config file
cp settings/production.yml.example settings/production.yml
- Puts your settings in config file
cap production deploy
- Include App nginx config into your main nginx config
include /var/www/USER/data/www/MY_APP/shared/web_server/nginx/config;
- restart nginx
/etc/init.d/nginx restart
orservice nginx restart
- Profit!
- Settingslogic for config files
- Nginx, Unicorn config templates
- Only production stage
- Ready for small projects, but not for giants
It's a draft. It's need a lot of work, but it'a alive! You can try it.
- To improve Unicorn configs
- To add Monit configs
- To drink tea with piece of chocolate
Check acceess to server
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys'
include /var/www/USER/data/www/MY_APP/shared/web_server/nginx/config;
cap ENV_NAME TASK_NAME
For example:
cap production info:image_magick
cap production info:gemset
cap production deploy
cap production nginx:restart
Is it ugly? Just destroy it!
Stop Unicorn and destroy.
cap production destroy:soft
or destroy file structure right now!
cap production destroy:hard
Copyright (c) [2013] [Ilya N. Zykin, github/the-teacher]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.