rumination 0.8.1 → 0.9.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/lib/rumination/deploy/base.rb +11 -5
- data/lib/rumination/docker_compose/container.rb +14 -0
- data/lib/rumination/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12ea68a706a32e7164b3f50169eefff180acdc44
|
4
|
+
data.tar.gz: 833f7213b06e7ddd560ef51b33db45f0f1c298f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a806bcb23e63dedb350c6a72de37872d86b1d58cef4526cdbd29bbb6ef59048cfb6c69f0a7d553e7d15ef573181901984b82e371daa837b73f46f13a5b14ba72
|
7
|
+
data.tar.gz: 129a240c1a09d5219291d9cb1dc106446424737b0992ce01007532b2f3c31926094dae5ce671083db63a11b4c626e10b95c1df0c230e141872782e5c56ba2a57
|
@@ -16,7 +16,10 @@ module Rumination
|
|
16
16
|
|
17
17
|
def bootstrap
|
18
18
|
call do
|
19
|
-
|
19
|
+
raise BootstrappedAlready if bootstrapped?
|
20
|
+
copy_dump_if_requested
|
21
|
+
container(:backend).run("rake deploy:bootstrap:inside[#{target}]")
|
22
|
+
raise BootstrapError unless $? == 0
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
@@ -66,10 +69,13 @@ module Rumination
|
|
66
69
|
|
67
70
|
private
|
68
71
|
|
69
|
-
def
|
70
|
-
|
71
|
-
|
72
|
-
|
72
|
+
def copy_dump_if_requested
|
73
|
+
return unless config.copy_dumpfile.present?
|
74
|
+
return unless File.exists?(config.copy_dumpfile)
|
75
|
+
container(:backend).cp_to_container(
|
76
|
+
config.copy_dumpfile,
|
77
|
+
Rumination.config.pg.dumpfile_path
|
78
|
+
)
|
73
79
|
end
|
74
80
|
|
75
81
|
def load_application_config_if_exists
|
@@ -29,6 +29,20 @@ module Rumination
|
|
29
29
|
sh "docker-compose restart", name, *args
|
30
30
|
self
|
31
31
|
end
|
32
|
+
|
33
|
+
def cp_to_container local_path, container_path, *args
|
34
|
+
args << local_path
|
35
|
+
args << "#{full_name}:#{container_path}"
|
36
|
+
sh "docker cp", *args
|
37
|
+
end
|
38
|
+
|
39
|
+
def full_name
|
40
|
+
"#{compose_project_name}_#{name}"
|
41
|
+
end
|
42
|
+
|
43
|
+
def compose_project_name
|
44
|
+
ENV["COMPOSE_PROJECT_NAME"]
|
45
|
+
end
|
32
46
|
end
|
33
47
|
end
|
34
48
|
end
|
data/lib/rumination/version.rb
CHANGED