Permalink
Browse files

Adds capistrano deployment files, v3

  • Loading branch information...
1 parent 90d4557 commit dc1900aab5386b164430b001032b310f78a3c0e5 @jeremykendall committed Nov 24, 2013
Showing with 56 additions and 0 deletions.
  1. +8 −0 Capfile
  2. +38 −0 config/deploy.rb
  3. +7 −0 config/deploy/production.rb
  4. +3 −0 lib/capistrano/tasks/.gitignore
View
@@ -0,0 +1,8 @@
+# Load DSL and Setup Up Stages
+require 'capistrano/setup'
+
+# Includes default deployment tasks
+require 'capistrano/deploy'
+
+# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
+Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
View
@@ -0,0 +1,38 @@
+set :application, 'flaming-archer'
+set :repo_url, 'git@github.com:jeremykendall/flaming-archer.git'
+
+set :branch, 'develop'
+
+set :deploy_to, '/var/www/net.jeremykendall.365'
+set :deploy_via, :remote_cache
+set :scm, :git
+
+# Seems to require 'role :app'
+set :linked_files, %w{config/local.php db/flaming-archer.db public/feed.xml}
+set :linked_dirs, %w{logs templates/cache}
+
+set :keep_releases, 5
+
+namespace :deploy do
+
+ desc 'composer install'
+ task :composer_install do
+ on roles(:web) do
+ within release_path do
+ execute 'composer', 'install', '--no-dev', '--optimize-autoloader'
+ end
+ end
+ end
+
+ after :updated, 'deploy:composer_install'
+
+ desc 'Restart application - does nothing, see comments below'
+ task :restart do
+ on roles(:app), in: :sequence, wait: 5 do
+ # This is present b/c 'cap production deploy' is blowing up w/o it.
+ # Not sure what's up with that, the Google hasn't helped, and I'm tired
+ # of screwing with it. It stays in for now.
+ end
+ end
+
+end
@@ -0,0 +1,7 @@
+set :stage, :production
+
+role :web, %w{jeremykendall@365.jeremykendall.net}
+role :app, %w{jeremykendall@365.jeremykendall.net}
+set :ssh_options, {
+ forward_agent: true
+}
@@ -0,0 +1,3 @@
+# Directory for custom capistrano tasks
+*
+!.gitignore

0 comments on commit dc1900a

Please sign in to comment.