railman-deployment 2.0.14 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/railman-deployment/version.rb +1 -1
- data/lib/railman/tasks/deployment.rake +17 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 910a2b1b2539484221207ad7fc1197afc14c04db70425a542a11ea7ca161f307
|
4
|
+
data.tar.gz: 7c46eb2c5c19587884189e795b769363eac0545d4a73cd8958a0cd9cbbef19dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e1db881c56b002632609e399cc37d258bd641f36a5c0598aa2ccfd17ea9326624ab3807efaa66f3211b4639895812f5ff29abb28b310af5e309820bd1172fa
|
7
|
+
data.tar.gz: f795aee9aa04af04972d50d41086b06ed10c406316114d2c5e1df8332fdf2cca85b072ec1a291e4a868e9ef746517906f0b9b73123e3f99b4334f0cc31339838
|
@@ -11,7 +11,7 @@ task :setup do
|
|
11
11
|
server_conf_dir = "#{fetch(:deploy_to)}/config/server"
|
12
12
|
execute :su_cp, "#{server_conf_dir}/puma.service /lib/systemd/system/#{fetch(:application)}.service"
|
13
13
|
execute :su_cp, "#{server_conf_dir}/sidekiq.service /lib/systemd/system/#{fetch(:application)}_sidekiq.service"
|
14
|
-
execute :
|
14
|
+
execute :su_cp, "#{server_conf_dir}/logrotate.conf /etc/logrotate.d/#{fetch(:application)}"
|
15
15
|
within fetch(:deploy_to) do
|
16
16
|
upload! './config/master.key', "#{fetch(:deploy_to)}/config/master.key"
|
17
17
|
execute :bundle, :install, '--without development test'
|
@@ -95,16 +95,24 @@ task :update do
|
|
95
95
|
invoke :sync_local_dirs_from_server
|
96
96
|
end
|
97
97
|
|
98
|
+
task :sync_local_dirs_to_server do
|
99
|
+
on roles(:all) do
|
100
|
+
fetch(:sync_dirs, []).each do |sync_dir|
|
101
|
+
if File.exists?("./#{sync_dir}")
|
102
|
+
run_locally do
|
103
|
+
execute "rsync -avz --delete -e ssh ./#{sync_dir}/ #{fetch(:user)}@#{fetch(:server)}:#{fetch(:deploy_to)}/#{sync_dir}/"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
98
110
|
task :sync_local_dirs_from_server do
|
99
111
|
on roles(:all) do
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
run_locally do
|
105
|
-
execute "rsync -avzm --delete --force -e ssh #{fetch(:user)}@#{fetch(:server)}:#{fetch(:deploy_to)}/#{sync_dir}/ ./#{sync_dir}/"
|
106
|
-
end
|
107
|
-
end
|
112
|
+
fetch(:sync_dirs, []).each do |sync_dir|
|
113
|
+
if test "[ -d #{fetch(:deploy_to)}/#{sync_dir} ]"
|
114
|
+
run_locally do
|
115
|
+
execute "rsync -avzm --delete --force -e ssh #{fetch(:user)}@#{fetch(:server)}:#{fetch(:deploy_to)}/#{sync_dir}/ ./#{sync_dir}/"
|
108
116
|
end
|
109
117
|
end
|
110
118
|
end
|