require'mina/bundler'require'mina/rails'require'mina/git'# Basic settings:# domain - The hostname to SSH to# deploy_to - Path to deploy into# repository - Git repo to clone from (needed by mina/git)# user - Username in the server to SSH to (optional)set:shared_paths,['config/database.yml','config/settings/production.yml','log/production.log','log/unicorn.log','public/system','public/uploads']set:domain,'YOUR_APP_DOMAIN'set:deploy_to,'YOUR_APP_FOLDER'set:repository,'YOUR_GIT_REPO'set:user,'deployer'desc"Deploys the current version to the server."task:deploydodeploydo# Put things that will set up an empty directory into a fully set-up# instance of your project.invoke:'git:clone'invoke:'deploy:link_shared_paths'invoke:'bundle:install'invoke:'rails:db_migrate'invoke:'rails:assets_precompile'to:launchdo# WATCH HERE FOR YOUR UNICORN/SERVER servicequeue'touch tmp/restart.txt'queue'service unicorn restart'endendenddesc"Shows logs."task:logsdoqueue%[cd #{deploy_to!} && tail -f shared/log/production.log]end
And really, that’s all there’s to it, I might post a full deploy guide soon if
someone ask for it.
Thanks for your time. Please follow
@cfcluan
on twitter and show this post to your firends.
You may also GitTip me if you are feeling generous.