dc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dc.rb +19 -1
- 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: a57e99828881fea49a8aec10222d56d37647f610606151039a5fb826369bad31
|
4
|
+
data.tar.gz: fc69e3fe7306b34fac1a7885123c02768e0b020ce32a238f727c0080e03b6015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1e1e96dd023af690a81ef4d25cc1069c66a12b0e6241f9c970912eddded612e8763fffa7caddc20d1c2be65e7712d87651187a771ff5b824826055e441e98df
|
7
|
+
data.tar.gz: ebd614d7c0a99ab98b33c57a587806c3a0bc222ea44d3781d66a12e3894c60ceb109da38244540019c0315ae3ee2cbb8e82db547609cc1589cef8fa5c63defd9
|
data/lib/dc.rb
CHANGED
@@ -13,13 +13,24 @@ module DC
|
|
13
13
|
case ARGV.size
|
14
14
|
when 1
|
15
15
|
case ARGV.first
|
16
|
+
when 'stop'
|
17
|
+
project.group.stop
|
18
|
+
when 'restart'
|
19
|
+
project.group.stop
|
20
|
+
project.group.start
|
16
21
|
when 'rs'
|
22
|
+
project.group.stop
|
23
|
+
project.group.rebuild_images
|
24
|
+
project.group.start
|
17
25
|
when 'ri'
|
18
26
|
project.rebuild_images
|
19
27
|
end
|
20
28
|
when 2
|
21
29
|
case ARGV
|
22
30
|
when ['rebuild', 'services']
|
31
|
+
project.group.stop
|
32
|
+
project.group.rebuild_images
|
33
|
+
project.group.start
|
23
34
|
when ['rebuild', 'images']
|
24
35
|
project.rebuild_images
|
25
36
|
end
|
@@ -108,10 +119,17 @@ module DC
|
|
108
119
|
containers.each &:start
|
109
120
|
end
|
110
121
|
|
111
|
-
def
|
122
|
+
def stop
|
112
123
|
containers.each &:destroy
|
113
124
|
end
|
114
125
|
|
126
|
+
def rebuild_images
|
127
|
+
images.each do |image|
|
128
|
+
image.tag "before_rebuild.#{Time.now.to_i}"
|
129
|
+
image.build
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
115
133
|
private
|
116
134
|
def create_containers
|
117
135
|
@hash.map do |name, value|
|