railman-deployment 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b052e7ca324262fc17b67994f92d9fb7f77d2652cfcf2b1c95ba66bbe801ebe0
4
- data.tar.gz: d53a9905caf04da79909d080160b7c950dd161b05472bb224c0c744345e72f3f
3
+ metadata.gz: a38e1a522eedbbade3e672bb23f55d49429179f2c61942279ecdd55536f61565
4
+ data.tar.gz: fba0e7dc05caa80d8e959b44cba36acb24a1cee93bbd8390e246c0196dcd2ee8
5
5
  SHA512:
6
- metadata.gz: 7bff6b9955740c0c60ca24c6ff68536d80e0bd2c04b7c5d9472fff7cedcb2d3f762eb36adc8946ecec1fa585933ccc30180eeb490f2292a6dae2f7c24ec0ebb6
7
- data.tar.gz: 1031819a404df257450a521ca3ae8bcf82378f56b93864edf85d858a8f73c10c29cb76db18dbce62b45e60559e1a140829b0fa490d99ddf167b9e90f0709a43f
6
+ metadata.gz: 15e348b09371d9ef1ce2d32dc8611d781bdc9268d5418a99acdd77d2b83aa1ed972df10bc03093153105c5682c19b3f569c72b8d24492384170d0f2bf87bd0bd
7
+ data.tar.gz: 160aaf97a1987b38e856813d7c5af4513ba0f836ed0da71deba6c0b8661b4e4e18cafbd4710c5156387e12184e7cac04e5dfceca3529070ad9c5cad89227207d
@@ -1,3 +1,3 @@
1
1
  module RailmanDeployment
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
3
  end
@@ -17,6 +17,7 @@ task :setup do
17
17
  execute :bundle, :install, '--without development test'
18
18
  invoke :create_database_from_sql_file
19
19
  execute :rake, 'assets:precompile'
20
+ execute :systemctl, 'daemon-reload'
20
21
  execute :systemctl, :start, fetch(:application)
21
22
  execute :systemctl, :start, "#{fetch(:application)}_sidekiq"
22
23
  execute :systemctl, :enable, fetch(:application)
@@ -25,7 +26,8 @@ task :setup do
25
26
  nginx_conf = File.read(File.join(File.dirname(__FILE__), 'nginx.conf'))
26
27
  nginx_conf.gsub!('DOMAINS', fetch(:domains).join(' '))
27
28
  nginx_conf.gsub!('APPLICATION', fetch(:application))
28
- upload! StringIO.new(nginx_conf), "/etc/nginx/conf.d/#{fetch(:application)}.conf"
29
+ upload! StringIO.new(nginx_conf), "#{fetch(:deploy_to)}/tmp/nginx.conf"
30
+ execute :su_cp, "#{fetch(:deploy_to)}/tmp/nginx.conf /etc/nginx/conf.d/#{fetch(:application)}.conf"
29
31
  execute :systemctl, :restart, :nginx
30
32
  execute :certbot, "certonly --webroot -w /home/deploy/apps/#{fetch(:application)}/public #{fetch(:domains).collect { |d| '-d ' + d }.join(' ')} -n --agree-tos -m #{fetch(:certbot_email)} --deploy-hook 'systemctl reload nginx'"
31
33
  # remove temporary nginx.conf and link config/server/nginx.conf to /etc/nginx/conf.d
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railman-deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev