groundskeeper-bitcore 0.14.0 → 0.15.0
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 +4 -4
- data/README.md +3 -2
- data/config/git_config.rb +1 -0
- data/config/predeploy.rb +26 -5
- data/config/vhost_config_nginx.conf.erb +26 -0
- data/lib/groundskeeper/application.rb +1 -0
- data/lib/groundskeeper/commands.rb +3 -2
- data/lib/groundskeeper/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b2c9f76613a798df337da19c7e2f6c6acbced59c9f898436d0bfcd7580c5d8f
|
4
|
+
data.tar.gz: fd6a49caf739108191eb2f3467747ad5d2242753d8a0df13d4a9aefa3a35c9fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d393d4cfa508eea20bf88c1247afcec9526364143a6ecec634278e1fb8389e3c318e4d7880e5d90c96de36e5b6c9a3029d1c5888d4f7d9c1288e56525012eb8c
|
7
|
+
data.tar.gz: d40db43a6832f614a1bf83c3f1abc2e5909cb8a0a86bcb68f0afe729f11555ea01eef763617364bacdf3bed9dd29af4fcc83b5782ce9a1be931e0efe009cf4d7
|
data/README.md
CHANGED
@@ -70,10 +70,11 @@ application directory:
|
|
70
70
|
ground release
|
71
71
|
```
|
72
72
|
|
73
|
-
To prepare the server (only required the first time) for deployment
|
73
|
+
To prepare the server (only required the first time) for deployment, add nginx
|
74
|
+
flag if deploying to nginx server:
|
74
75
|
|
75
76
|
```bash
|
76
|
-
tag=0.0.0 stage=production ground predeploy
|
77
|
+
tag=0.0.0 stage=production ground predeploy [--nginx]
|
77
78
|
```
|
78
79
|
|
79
80
|
To deploy the release (note that `stage` is optional and will be set to staging
|
data/config/git_config.rb
CHANGED
data/config/predeploy.rb
CHANGED
@@ -28,6 +28,14 @@ def vhost_config_file
|
|
28
28
|
"/etc/httpd/conf.d/#{fetch :application_name}.conf"
|
29
29
|
end
|
30
30
|
|
31
|
+
def vhost_nginx_config_file
|
32
|
+
"/etc/nginx/sites-available/#{fetch :application_name}.conf"
|
33
|
+
end
|
34
|
+
|
35
|
+
def vhost_nginx_linked_file
|
36
|
+
"/etc/nginx/sites-enabled/#{fetch :application_name}.conf"
|
37
|
+
end
|
38
|
+
|
31
39
|
def remote_shared_path(path)
|
32
40
|
"#{fetch(:user)}@#{fetch(:domain)}:#{fetch(:shared_path)}/#{path}"
|
33
41
|
end
|
@@ -101,14 +109,25 @@ namespace :deploy_configure do
|
|
101
109
|
end
|
102
110
|
# rubocop:enable Metrics/BlockLength
|
103
111
|
|
112
|
+
# rubocop:disable Metrics/BlockLength
|
104
113
|
namespace :deploy_prepare do
|
105
114
|
desc "Write the virtual host config file. May require an Apache restart."
|
106
115
|
task :create_vhost do
|
107
116
|
load_project
|
117
|
+
vhost_file = vhost_config_file
|
108
118
|
vhost_config = load_template("vhost_config.conf.erb")
|
109
|
-
|
110
|
-
|
111
|
-
|
119
|
+
|
120
|
+
if fetch(:nginx)
|
121
|
+
vhost_file = vhost_nginx_config_file
|
122
|
+
vhost_config = load_template("vhost_config_nginx.conf.erb")
|
123
|
+
command "sudo chown -R deploy:nginx /etc/nginx/sites-available"
|
124
|
+
command "sudo chown -R deploy:nginx /etc/nginx/sites-enabled"
|
125
|
+
end
|
126
|
+
|
127
|
+
if !(File.exist? vhost_file) || FORCE_OVERWRITE
|
128
|
+
comment "Writing virtual host config to #{vhost_file}"
|
129
|
+
command "echo \"#{vhost_config}\" > #{vhost_file}"
|
130
|
+
command "ln -s #{vhost_file} #{vhost_nginx_linked_file}" if fetch(:nginx)
|
112
131
|
end
|
113
132
|
end
|
114
133
|
|
@@ -120,7 +139,9 @@ namespace :deploy_prepare do
|
|
120
139
|
|
121
140
|
desc "Set owner."
|
122
141
|
task :set_owner do
|
123
|
-
|
124
|
-
|
142
|
+
owner = fetch(:nginx) ? "nginx" : "apache"
|
143
|
+
comment "Setting owner of #{fetch :deploy_to} #{owner}"
|
144
|
+
command "sudo chgrp -R #{owner} #{fetch :deploy_to}"
|
125
145
|
end
|
126
146
|
end
|
147
|
+
# rubocop:enable Metrics/BlockLength
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<% project = fetch :project -%>
|
2
|
+
server {
|
3
|
+
listen 80;
|
4
|
+
|
5
|
+
server_name <%= fetch :domain %>;
|
6
|
+
return 301 https://<%= fetch :domain -%>/;
|
7
|
+
}
|
8
|
+
|
9
|
+
server {
|
10
|
+
listen 443 ssl;
|
11
|
+
server_name <%= fetch :domain %>;
|
12
|
+
|
13
|
+
passenger_enabled on;
|
14
|
+
passenger_friendly_error_pages off;
|
15
|
+
passenger_app_env <%= fetch :stage %>;
|
16
|
+
passenger_ruby /usr/local/rvm/gems/ruby-<%= fetch :rvm_ruby_version -%>/wrappers/ruby;
|
17
|
+
passenger_min_instances 1;
|
18
|
+
passenger_base_uri /;
|
19
|
+
|
20
|
+
root <%= fetch :deploy_to -%>/current/public;
|
21
|
+
|
22
|
+
ssl_certificate <%= project.ssl_certificate_file(fetch(:stage).to_sym) %>;
|
23
|
+
ssl_certificate_key <%= project.ssl_certificate_key_file(fetch(:stage).to_sym) %>;
|
24
|
+
ssl_protocols TLSv1.2;
|
25
|
+
ssl_ciphers HIGH:!aNULL:!MD5;
|
26
|
+
}
|
@@ -7,7 +7,7 @@ require "open3"
|
|
7
7
|
|
8
8
|
module Groundskeeper
|
9
9
|
# Formulas for managing releases and deployments.
|
10
|
-
# rubocop:disable
|
10
|
+
# rubocop:disable Metrics/ClassLength
|
11
11
|
class Commands
|
12
12
|
RAKEFILE = File.join(
|
13
13
|
File.dirname(__FILE__), "..", "..", "config", "deploy.rb"
|
@@ -191,6 +191,7 @@ module Groundskeeper
|
|
191
191
|
cmd << " -s" if options[:simulate]
|
192
192
|
cmd << " -v" if options[:verbose]
|
193
193
|
cmd << " force_asset_precompile=true" if options[:force_asset_precompile]
|
194
|
+
cmd << " nginx=true" if options[:nginx]
|
194
195
|
run_mina cmd
|
195
196
|
end
|
196
197
|
|
@@ -434,5 +435,5 @@ module Groundskeeper
|
|
434
435
|
@current_step += 1
|
435
436
|
end
|
436
437
|
end
|
437
|
-
# rubocop:enable
|
438
|
+
# rubocop:enable Metrics/ClassLength
|
438
439
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groundskeeper-bitcore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BIT Core
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- certs/ericcf.pem
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jira-ruby
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- config/secrets_config.yml.erb
|
182
182
|
- config/tasks.rb
|
183
183
|
- config/vhost_config.conf.erb
|
184
|
+
- config/vhost_config_nginx.conf.erb
|
184
185
|
- groundskeeper.gemspec
|
185
186
|
- lib/groundskeeper.rb
|
186
187
|
- lib/groundskeeper/application.rb
|