panter-rails-deploy 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +68 -0
- data/LICENSE +8 -0
- data/README.md +36 -0
- data/Rakefile +1 -0
- data/lib/capistrano/tasks/panter-rails-deploy.rake +37 -0
- data/lib/panter-rails-deploy.rb +1 -0
- data/panter-rails-deploy.gemspec +27 -0
- metadata +180 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1f62ee723c442df04b70470c9a6bee3f54e5bfbf
|
4
|
+
data.tar.gz: d8033a6838f74feabed36419a9c7e223db710d8b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f7b527db9b47ce7580986168d2ff97829d5bcccd9a3d2516c80548cb03ca87b3ecd50fa6bcd1b4b19a1845ebd2a3013ff88f6a2185e7f333f99cf47f7a31711b
|
7
|
+
data.tar.gz: 833393b0f0dc37e3f551c5662aebe86020b73ed305790b58cef9f32f42edbf18ad6a3466ded18fe695daeb789a5dbed284250d0eb4207fef6ce14e77940715ea
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.2
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
panter-rails-deploy (1.0.0)
|
5
|
+
capistrano
|
6
|
+
capistrano-bundler
|
7
|
+
capistrano-rails
|
8
|
+
capistrano-rbenv
|
9
|
+
capistrano-rbenv-install
|
10
|
+
dotenv-rails
|
11
|
+
execjs
|
12
|
+
therubyracer
|
13
|
+
unicorn-rails
|
14
|
+
|
15
|
+
GEM
|
16
|
+
remote: https://rubygems.org/
|
17
|
+
specs:
|
18
|
+
capistrano (3.4.0)
|
19
|
+
i18n
|
20
|
+
rake (>= 10.0.0)
|
21
|
+
sshkit (~> 1.3)
|
22
|
+
capistrano-bundler (1.1.4)
|
23
|
+
capistrano (~> 3.1)
|
24
|
+
sshkit (~> 1.2)
|
25
|
+
capistrano-rails (1.1.3)
|
26
|
+
capistrano (~> 3.1)
|
27
|
+
capistrano-bundler (~> 1.1)
|
28
|
+
capistrano-rbenv (2.0.3)
|
29
|
+
capistrano (~> 3.1)
|
30
|
+
sshkit (~> 1.3)
|
31
|
+
capistrano-rbenv-install (1.2.0)
|
32
|
+
capistrano (>= 3.0)
|
33
|
+
capistrano-rbenv (>= 2.0)
|
34
|
+
colorize (0.7.7)
|
35
|
+
dotenv (2.0.1)
|
36
|
+
dotenv-rails (2.0.1)
|
37
|
+
dotenv (= 2.0.1)
|
38
|
+
execjs (2.5.2)
|
39
|
+
i18n (0.7.0)
|
40
|
+
kgio (2.9.3)
|
41
|
+
libv8 (3.16.14.7)
|
42
|
+
net-scp (1.2.1)
|
43
|
+
net-ssh (>= 2.6.5)
|
44
|
+
net-ssh (2.9.2)
|
45
|
+
rack (1.6.1)
|
46
|
+
raindrops (0.13.0)
|
47
|
+
rake (10.4.2)
|
48
|
+
ref (1.0.5)
|
49
|
+
sshkit (1.7.1)
|
50
|
+
colorize (>= 0.7.0)
|
51
|
+
net-scp (>= 1.1.2)
|
52
|
+
net-ssh (>= 2.8.0)
|
53
|
+
therubyracer (0.12.2)
|
54
|
+
libv8 (~> 3.16.14.0)
|
55
|
+
ref
|
56
|
+
unicorn (4.9.0)
|
57
|
+
kgio (~> 2.6)
|
58
|
+
rack
|
59
|
+
raindrops (~> 0.7)
|
60
|
+
unicorn-rails (2.2.0)
|
61
|
+
rack
|
62
|
+
unicorn
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
panter-rails-deploy!
|
data/LICENSE
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
* ----------------------------------------------------------------------------
|
3
|
+
* "THE BEER-WARE LICENSE" (Revision 42):
|
4
|
+
* <mak@panter.ch> wrote this file. As long as you retain this notice you
|
5
|
+
* can do whatever you want with this stuff. If we meet some day, and you think
|
6
|
+
* this stuff is worth it, you can buy me a beer in return.
|
7
|
+
* ----------------------------------------------------------------------------
|
8
|
+
*/
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Panter Rails Deploy
|
2
|
+
|
3
|
+
This gem sets up everything you need to deploy your application on the Panter rails hosting:
|
4
|
+
|
5
|
+
- capistrano 3
|
6
|
+
- unicorn
|
7
|
+
- rbenv
|
8
|
+
- dotenv
|
9
|
+
|
10
|
+
## How to use
|
11
|
+
|
12
|
+
- Add to your Gemfile:
|
13
|
+
```ruby
|
14
|
+
gem 'panter-rails-deploy'
|
15
|
+
```
|
16
|
+
|
17
|
+
- Capify your project:
|
18
|
+
```sh
|
19
|
+
cap install
|
20
|
+
```
|
21
|
+
|
22
|
+
- Add `require 'panter-rails-deploy'` to `Capfile`
|
23
|
+
|
24
|
+
- Set `:application` and `:repo_url` in `config/deploy.rb`
|
25
|
+
|
26
|
+
- Set up your stages in `config/deploy` folder (e.g. `config/deploy/production.rb`):
|
27
|
+
```ruby
|
28
|
+
server 'my-server.example.com', roles: %w[ web app db ]
|
29
|
+
set :branch, 'master'
|
30
|
+
set :rails_env, 'staging' # 'production' by default for all stages
|
31
|
+
```
|
32
|
+
|
33
|
+
- Profit:
|
34
|
+
```sh
|
35
|
+
cap production deploy
|
36
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'capistrano/rbenv'
|
2
|
+
require 'capistrano/rbenv_install'
|
3
|
+
require 'capistrano/bundler'
|
4
|
+
require 'capistrano/rails/assets'
|
5
|
+
require 'capistrano/rails/migrations'
|
6
|
+
|
7
|
+
namespace :load do
|
8
|
+
task :defaults do
|
9
|
+
# Setup capistrano
|
10
|
+
set :user, 'app'
|
11
|
+
set :deploy_to, -> { "/home/#{ fetch(:user) }/app" }
|
12
|
+
set :ssh_options, -> { { user: fetch(:user), forward_agent: true } }
|
13
|
+
set :log_level, :info
|
14
|
+
|
15
|
+
set :linked_files, %w[ config/database.yml ]
|
16
|
+
set :linked_dirs, %w[ log tmp/cache ]
|
17
|
+
|
18
|
+
# Setup capistrano-rails
|
19
|
+
set :rails_env, 'production'
|
20
|
+
|
21
|
+
# Setup capistrano-rbenv
|
22
|
+
set :rbenv_ruby, open("#{ Bundler.root }/.ruby-version").read.strip
|
23
|
+
|
24
|
+
# Setup capistrano-bundler
|
25
|
+
set :bundle_jobs, 2
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :deploy do
|
30
|
+
after :restart, :clear_cache do
|
31
|
+
on roles(:app), in: :sequence do
|
32
|
+
with rails_env: fetch(:rails_env) do
|
33
|
+
execute '$HOME/bin/unicorn_wrapper', 'restart'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../capistrano/tasks/panter-rails-deploy.rake', __FILE__)
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.name = 'panter-rails-deploy'
|
3
|
+
gem.version = '1.0.0'
|
4
|
+
gem.date = '2015-06-01'
|
5
|
+
gem.summary = 'Capistrano setup for Panter Rails Hosting'
|
6
|
+
gem.authors = [ 'Markus Koller', 'Beat Seeliger' ]
|
7
|
+
gem.email = 'mak@panter.ch'
|
8
|
+
gem.homepage = 'https://github.com/panter/panter-rails-deploy'
|
9
|
+
gem.license = 'Beerware'
|
10
|
+
gem.required_ruby_version = '>= 2.0.0'
|
11
|
+
|
12
|
+
gem.files = `git ls-files`.split($/)
|
13
|
+
gem.require_paths = [ 'lib' ]
|
14
|
+
|
15
|
+
# Deployment dependencies
|
16
|
+
gem.add_dependency 'capistrano'
|
17
|
+
gem.add_dependency 'capistrano-rails'
|
18
|
+
gem.add_dependency 'capistrano-bundler'
|
19
|
+
gem.add_dependency 'capistrano-rbenv'
|
20
|
+
gem.add_dependency 'capistrano-rbenv-install'
|
21
|
+
gem.add_dependency 'unicorn-rails'
|
22
|
+
gem.add_dependency 'dotenv-rails'
|
23
|
+
|
24
|
+
# Asset pipeline dependencies
|
25
|
+
gem.add_dependency 'execjs'
|
26
|
+
gem.add_dependency 'therubyracer'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,180 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: panter-rails-deploy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Markus Koller
|
8
|
+
- Beat Seeliger
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: capistrano-rails
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: capistrano-bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: capistrano-rbenv
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: capistrano-rbenv-install
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: unicorn-rails
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: dotenv-rails
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: execjs
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: therubyracer
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
description:
|
141
|
+
email: mak@panter.ch
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".ruby-version"
|
148
|
+
- Gemfile
|
149
|
+
- Gemfile.lock
|
150
|
+
- LICENSE
|
151
|
+
- README.md
|
152
|
+
- Rakefile
|
153
|
+
- lib/capistrano/tasks/panter-rails-deploy.rake
|
154
|
+
- lib/panter-rails-deploy.rb
|
155
|
+
- panter-rails-deploy.gemspec
|
156
|
+
homepage: https://github.com/panter/panter-rails-deploy
|
157
|
+
licenses:
|
158
|
+
- Beerware
|
159
|
+
metadata: {}
|
160
|
+
post_install_message:
|
161
|
+
rdoc_options: []
|
162
|
+
require_paths:
|
163
|
+
- lib
|
164
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: 2.0.0
|
169
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
requirements: []
|
175
|
+
rubyforge_project:
|
176
|
+
rubygems_version: 2.4.5
|
177
|
+
signing_key:
|
178
|
+
specification_version: 4
|
179
|
+
summary: Capistrano setup for Panter Rails Hosting
|
180
|
+
test_files: []
|