#Deploy html5 and php sites via Capistrano
This project requires the user to have root access to their server (VPS) and to have already setup Apache/nginx on it. It also requires yeoman.io to be installed, as the build process is delegated.
##Setting up
- Run the following from the terminal:
gem install capistrano ;
gem install railsless-deploy
- Download this project to your root folder (ensure
config
folder andCapfile
are in the project root). - Open
config/deploy.rb
- Change line 3
set :application, "website.com"
to whatever the app is called - Change line 10
set :domain, "xxx.xxx.xxx.xxx"
to the IP of your VPS.
You will require an SSH key to have been setup prior to continuing
- This script deploys to
"/home/www/#{application}/html"
by default*
A production folder and staging folder will be created in this deploy dir to enable a staging domain for testing, and a production domain for production ready code. Please ensure your VPS is configured, and hosts file matches deploy locations.
##Deploying
###Default behaviour
Run capistrano deploy
or capistrano staging deploy
to deploy. Capistrano will build the project using yeoman, and then deploy to staging by default.
###Production
You can overwrite the default behaviour by typing capistrano production deploy
, which will build, then deploy to production.