weapon 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e41f3b41099196ae19a48053b50d6ced363bb798
|
|
4
|
+
data.tar.gz: 7a4e95b893d4d6f886107d0de647530da14cdd51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4176ce495905bd7756f644a8e661a086db698e17ae06c550bcc6ff9ee38e071b375e6f1ad200f32e8872a1723f2b0c70a7c5f346487bbe681075b7ca37ccfade
|
|
7
|
+
data.tar.gz: 9d6fd074e7f608318313b7112572aa0b261d2edfd0d709597c085e8e8a1882fd8f1486bd8f0a06d9497378d3462fe374cd9850fd003f8eb0b92e6b5541d27965
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
upstream app_name_for_replace {
|
|
2
|
+
# Path to Unicorn SOCK file, as defined previously
|
|
3
|
+
server unix:/tmp/app_name_for_replace.unicorn.sock;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
server {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
listen 80;
|
|
10
|
+
server_name domain_for_replace;
|
|
11
|
+
|
|
12
|
+
# Application root, as defined previously
|
|
13
|
+
root deploy_directory_for_replace_staging/current/public;
|
|
14
|
+
|
|
15
|
+
try_files $uri @app_name_for_replace;
|
|
16
|
+
access_log /var/log/nginx/app_name_for_replace_access.log;
|
|
17
|
+
error_log /var/log/nginx/app_name_for_replace_error.log;
|
|
18
|
+
|
|
19
|
+
location @app_name_for_replace{
|
|
20
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
21
|
+
proxy_set_header Host $http_host;
|
|
22
|
+
proxy_redirect off;
|
|
23
|
+
proxy_pass http://app_name_for_replace;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
error_page 500 502 503 504 /500.html;
|
|
27
|
+
client_max_body_size 4G;
|
|
28
|
+
keepalive_timeout 10;
|
|
29
|
+
}
|
|
@@ -10,7 +10,7 @@ server {
|
|
|
10
10
|
server_name domain_for_replace;
|
|
11
11
|
|
|
12
12
|
# Application root, as defined previously
|
|
13
|
-
root /
|
|
13
|
+
root deploy_directory_for_replace/current/public;
|
|
14
14
|
|
|
15
15
|
try_files $uri @app_name_for_replace;
|
|
16
16
|
access_log /var/log/nginx/app_name_for_replace_access.log;
|
data/lib/weapon.rb
CHANGED
|
@@ -37,9 +37,11 @@ class Weapon < Thor
|
|
|
37
37
|
def setup_mina_unicorn
|
|
38
38
|
makesure_in_git
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
gem_group :development do
|
|
41
|
+
gem 'mina-multistage', require: false
|
|
42
|
+
gem 'mina-unicorn', require: false
|
|
43
|
+
gem 'unicorn'
|
|
44
|
+
end
|
|
43
45
|
run "bundle"
|
|
44
46
|
FileUtils.mkdir_p "config/deploy"
|
|
45
47
|
FileUtils.mkdir_p "config/unicorn"
|
|
@@ -50,6 +52,7 @@ class Weapon < Thor
|
|
|
50
52
|
copy_file 'support/mina_unicorn/deploy_production.rb', 'config/deploy/production.rb'
|
|
51
53
|
copy_file 'support/mina_unicorn/deploy_staging.rb', 'config/deploy/staging.rb'
|
|
52
54
|
copy_file 'support/mina_unicorn/unicorn-nginx.conf', 'unicorn-nginx.conf'
|
|
55
|
+
copy_file 'support/mina_unicorn/staging-unicorn-nginx.conf', 'staging-unicorn-nginx.conf'
|
|
53
56
|
|
|
54
57
|
puts "setup mina deploy"
|
|
55
58
|
|
|
@@ -67,6 +70,7 @@ class Weapon < Thor
|
|
|
67
70
|
gsub_file "config/unicorn/staging.rb", "#{key}_for_replace", eval(key)
|
|
68
71
|
|
|
69
72
|
gsub_file "unicorn-nginx.conf", "#{key}_for_replace", eval(key)
|
|
73
|
+
gsub_file "staging-unicorn-nginx.conf", "#{key}_for_replace", eval(key)
|
|
70
74
|
gsub_file "config/deploy.rb", "#{key}_for_replace", eval(key)
|
|
71
75
|
|
|
72
76
|
end
|
|
@@ -85,7 +89,7 @@ class Weapon < Thor
|
|
|
85
89
|
run 'scp config/application.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
|
|
86
90
|
run 'scp config/secrets.yml ' + username + '@' + domain + ':' + deploy_directory + '_staging/shared/config/'
|
|
87
91
|
|
|
88
|
-
run 'scp unicorn-nginx.conf ' + username + '@' + domain + ':' + "/etc/nginx/sites-enabled/#{app_name}.conf"
|
|
92
|
+
#run 'scp unicorn-nginx.conf ' + username + '@' + domain + ':' + "/etc/nginx/sites-enabled/#{app_name}.conf"
|
|
89
93
|
=begin
|
|
90
94
|
run "git clone https://github.com/sstephenson/rbenv.git ~/.rbenv"
|
|
91
95
|
run "echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc"
|
|
@@ -94,7 +98,8 @@ class Weapon < Thor
|
|
|
94
98
|
|
|
95
99
|
run 'mina setup'
|
|
96
100
|
run 'mina deploy'
|
|
97
|
-
puts "remember to
|
|
101
|
+
puts "remember to make soft link to unicorn-nginx.conf && staging-unicorn-nginx.conf".colorize(:blue)
|
|
102
|
+
puts "remember to restart nginx server".colorize(:blue)
|
|
98
103
|
end
|
|
99
104
|
|
|
100
105
|
desc "setup_settings_ui", "setup settings ui"
|
|
@@ -179,9 +184,11 @@ class Weapon < Thor
|
|
|
179
184
|
gem 'slack-notifier'
|
|
180
185
|
gem 'activevalidators'
|
|
181
186
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
gem_group :development do
|
|
188
|
+
gem 'mina', require: false
|
|
189
|
+
gem 'mina-multistage', require: false
|
|
190
|
+
gem 'mina-sidekiq', require: false
|
|
191
|
+
end
|
|
185
192
|
|
|
186
193
|
gem 'figaro'
|
|
187
194
|
gem 'whenever', '~> 0.9.2'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: weapon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- seaify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-05-
|
|
11
|
+
date: 2016-05-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -52,6 +52,20 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0.14'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: colorize
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 0.7.7
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 0.7.7
|
|
55
69
|
- !ruby/object:Gem::Dependency
|
|
56
70
|
name: awesome_print
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -90,6 +104,7 @@ files:
|
|
|
90
104
|
- lib/support/mina_unicorn/deploy.rb
|
|
91
105
|
- lib/support/mina_unicorn/deploy_production.rb
|
|
92
106
|
- lib/support/mina_unicorn/deploy_staging.rb
|
|
107
|
+
- lib/support/mina_unicorn/staging-unicorn-nginx.conf
|
|
93
108
|
- lib/support/mina_unicorn/unicorn-nginx.conf
|
|
94
109
|
- lib/support/mina_unicorn/unicorn.rb
|
|
95
110
|
- lib/support/mina_unicorn/unicorn_production.rb
|