]> cat aescling's git repositories - mastodon.git/commitdiff
Add capistrano to development environment
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 30 Jan 2017 19:03:17 +0000 (20:03 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 30 Jan 2017 19:03:17 +0000 (20:03 +0100)
.gitignore
Capfile [new file with mode: 0644]
Gemfile
Gemfile.lock
config/deploy.rb [new file with mode: 0644]

index 7f51045aa0bbc4aab62757a4bd54f3492728638f..6d540c41387223b03972cebb21c4f2e2020c4541 100644 (file)
@@ -25,3 +25,6 @@ neo4j/
 
 # Ignore Vagrant files
 .vagrant/
+
+# Ignore Capistrano customizations
+config/deploy/*
diff --git a/Capfile b/Capfile
new file mode 100644 (file)
index 0000000..4a3b6d6
--- /dev/null
+++ b/Capfile
@@ -0,0 +1,13 @@
+require 'capistrano/setup'
+require 'capistrano/deploy'
+require 'capistrano/scm/git'
+
+install_plugin Capistrano::SCM::Git
+
+require 'capistrano/rbenv'
+require 'capistrano/bundler'
+require 'capistrano/yarn'
+require 'capistrano/rails/assets'
+require 'capistrano/rails/migrations'
+
+Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
diff --git a/Gemfile b/Gemfile
index 4472f330628b8722a7a3774a37eb538366813ba4..6fd86ec488ccc4448bfaed10b84a17b23959f679 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -78,6 +78,11 @@ group :development do
   gem 'letter_opener_web'
   gem 'bullet'
   gem 'active_record_query_trace'
+
+  gem 'capistrano'
+  gem 'capistrano-rails'
+  gem 'capistrano-rbenv'
+  gem 'capistrano-yarn'
 end
 
 group :production do
index bfed29072681109e5881ae3c8e72c0b71597183c..dd3105b38a785733eed108a6f1b248667dd0d955 100644 (file)
@@ -41,6 +41,8 @@ GEM
       tzinfo (~> 1.1)
     addressable (2.5.0)
       public_suffix (~> 2.0, >= 2.0.2)
+    airbrussh (1.1.2)
+      sshkit (>= 1.6.1, != 1.7.0)
     arel (7.1.4)
     ast (2.3.0)
     attr_encrypted (3.0.3)
@@ -78,6 +80,24 @@ GEM
     bullet (5.3.0)
       activesupport (>= 3.0.0)
       uniform_notifier (~> 1.10.0)
+    capistrano (3.7.2)
+      airbrussh (>= 1.0.0)
+      capistrano-harrow
+      i18n
+      rake (>= 10.0.0)
+      sshkit (>= 1.9.0)
+    capistrano-bundler (1.2.0)
+      capistrano (~> 3.1)
+      sshkit (~> 1.2)
+    capistrano-harrow (0.5.3)
+    capistrano-rails (1.2.2)
+      capistrano (~> 3.1)
+      capistrano-bundler (~> 1.1)
+    capistrano-rbenv (2.1.0)
+      capistrano (~> 3.1)
+      sshkit (~> 1.3)
+    capistrano-yarn (2.0.2)
+      capistrano (~> 3.0)
     chunky_png (1.3.8)
     climate_control (0.1.0)
     cocaine (0.5.8)
@@ -213,6 +233,9 @@ GEM
     minitest (5.10.1)
     multi_json (1.12.1)
     multi_xml (0.6.0)
+    net-scp (1.2.1)
+      net-ssh (>= 2.6.5)
+    net-ssh (4.0.1)
     nio4r (1.2.1)
     nokogiri (1.7.0.1)
       mini_portile2 (~> 2.1.0)
@@ -389,6 +412,9 @@ GEM
       actionpack (>= 4.0)
       activesupport (>= 4.0)
       sprockets (>= 3.0.0)
+    sshkit (1.11.5)
+      net-scp (>= 1.1.2)
+      net-ssh (>= 2.8.0)
     statsd-instrument (2.1.2)
     temple (0.7.7)
     term-ansicolor (1.4.0)
@@ -433,6 +459,10 @@ DEPENDENCIES
   binding_of_caller
   browserify-rails
   bullet
+  capistrano
+  capistrano-rails
+  capistrano-rbenv
+  capistrano-yarn
   coffee-rails (~> 4.1.0)
   devise
   devise-two-factor
diff --git a/config/deploy.rb b/config/deploy.rb
new file mode 100644 (file)
index 0000000..cbfb8ec
--- /dev/null
@@ -0,0 +1,11 @@
+lock '3.7.2'
+
+set :application, 'mastodon'
+set :repo_url, 'https://github.com/tootsuite/mastodon.git'
+set :branch, 'master'
+set :rbenv_type, :user
+set :rbenv_ruby, File.read('.ruby-version').strip
+set :migration_role, :app
+
+append :linked_files, '.env.production'
+append :linked_dirs, 'vendor/bundle', 'node_modules', 'public/system'