pkill -6 tail
- 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 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
cap production 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 add Puma templates
- To drink tea with piece of chocolate
- To take over the world
Check acceess to server
ssh root@my-mega-project.com
ssh deployer@my-mega-project.com
cat ~/.ssh/id_rsa.pub | ssh deployer@my-mega-project.com 'cat >> ~/.ssh/authorized_keys'
cap ENV_NAME TASK_NAME
For example:
cap production info:image_magick
cap production info:gemset
cap production deploy
include /var/www/USER/data/www/MY_APP/shared/web_server/nginx/config;
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
cap production deploy:rollback
cap production -vT | grep web_server
cap web_server:force
cap web_server:force-stop
cap web_server:restart
cap web_server:start
cap web_server:stop
it's mean that you should to execute:
cap production web_server:restart
cap -vT | grep nginx
cap -vT | grep info
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.