railman-deployment 1.1.2 → 1.1.3

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
  SHA1:
3
- metadata.gz: 676fe8d7b3463a4f37d6fc785c888413bec3272f
4
- data.tar.gz: f546d4b31ead1df2082c6eacb691e45467a56494
3
+ metadata.gz: 438bf0fcfe6ee714376a93d6d67b20b8b3c9328a
4
+ data.tar.gz: c502bfdeedf9a9aedff431f87aafc2fc65258a59
5
5
  SHA512:
6
- metadata.gz: 41af320341d6499f8f1ebd492a7aa29b12214d7784bb89e98caeb72376c8ac4851334ca4cde94c9b0f3e9d0f25996868da1d8d737a6bd3e89aea5d3cbbfef592
7
- data.tar.gz: e919bd6d76c89745021b08868018a89ffd0eeafb886736aef87de0ab6fe3c2c4585e6655b3acd4e0d24eceb6552217597902a1f92e2c02c334f4de5af0e4e4f0
6
+ metadata.gz: 30049adbd9763679663e611f68b61a0f7712dab8b382a6e83998c4b661cd277e9751807839d01dbd964e33fe1d5f8f633d1f0b775301b7b6c4aab22463ba6979
7
+ data.tar.gz: 348fd238016470a24100ca814de4dc89485c4ac8547d879e7f706bdeaf78f6a3ce131958ad22ab3ef0a52e1589b55c8655d53839d95fad8af4f43ca9bd0da04c
@@ -1,3 +1,3 @@
1
1
  module RailmanDeployment
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
@@ -21,7 +21,7 @@ task :setup do
21
21
  execute :eye, :load, 'Eyefile'
22
22
  execute :eye, :start, fetch(:application)
23
23
  execute :service, 'nginx restart'
24
- execute :certbot, "--nginx -d #{fetch(:domain)}"
24
+ warn "TODO: Run certbot--nginx -d #{fetch(:domain)} on the server as root to create a certificate"
25
25
  else
26
26
  execute "cp #{fetch(:deploy_to)}/.env.example.production #{fetch(:deploy_to)}/.env"
27
27
  execute "sed -i -e 's/TODO: generate with: rake secret/#{SecureRandom.hex(64)}/g' #{fetch(:deploy_to)}/.env"
@@ -52,7 +52,7 @@ task :setup_spa do
52
52
  execute :cp, "#{server_conf_dir}/nginx_spa.conf /etc/nginx/sites-available/#{fetch(:spa_domain)}"
53
53
  execute :ln, "-s -f /etc/nginx/sites-available/#{fetch(:spa_domain)} /etc/nginx/sites-enabled/"
54
54
  execute :service, 'nginx restart'
55
- execute :certbot, "--nginx -d #{fetch(:spa_domain)}"
55
+ warn "TODO: Run certbot--nginx -d #{fetch(:spa_domain)} on the server as root to create a certificate"
56
56
  end
57
57
  end
58
58
  end
@@ -77,6 +77,7 @@ task :remove do
77
77
  execute :su_rm, "-f /etc/nginx/sites-available/#{fetch(:spa_domain)}"
78
78
  end
79
79
  execute :service, 'nginx restart'
80
+ warn 'TODO: Run certbot--nginx remove on the server as root to remove the certificate'
80
81
  end
81
82
  end
82
83
  end
@@ -93,7 +94,6 @@ task :deploy do
93
94
  execute :eye, :restart, fetch(:application)
94
95
  execute :service, 'nginx restart'
95
96
  end
96
- invoke :deploy_spa
97
97
  end
98
98
  end
99
99
  end
@@ -108,11 +108,17 @@ task :deploy_spa do
108
108
  execute :yarn, 'run build'
109
109
  execute "rsync -avz --delete #{fetch(:deploy_spa_to)}/dist/ #{fetch(:deploy_spa_to)}/public/"
110
110
  execute :service, 'nginx restart'
111
- end if test "[ -d #{fetch(:deploy_spa_to)} ]"
111
+ end
112
112
  end
113
113
  end
114
114
  end
115
115
 
116
+ desc 'Deploy both the rails application and the spa application'
117
+ task :deploy_all do
118
+ invoke :deploy
119
+ invoke :deploy_spa
120
+ end
121
+
116
122
  desc 'Copy database from the server to the local machine'
117
123
  task :update do
118
124
  on roles(:all) do
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: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev