fidoci 0.1.7 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fidoci/env.rb +16 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aaa3751f85c4bad189bd011b7fafd58caf5a839
|
4
|
+
data.tar.gz: adabdb607b4062cf30158723c105a0ffb5c2ce9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a74e5251cd2fe9edb85c937887fc06384861bcfd7481cb4f236a879e4e87f8e0dc3446508e8e751fb228a137ee95edbfb42330e6fb2ec9c9cdc1ec7040245bb
|
7
|
+
data.tar.gz: f8bb5cff8857d5c391c225cd67a54cd44e78a96bc304192da49f4065b175922b1460ad630e3139acb8c5f3bef5f08489ed12107e77c349f1a7ac17776f59a008
|
data/lib/fidoci/env.rb
CHANGED
@@ -142,6 +142,11 @@ module Fidoci
|
|
142
142
|
def stop!
|
143
143
|
links.map{|key, config|
|
144
144
|
cname = link_container_name(key)
|
145
|
+
if links[key]['shared']
|
146
|
+
debug "Keeping running #{cname}..."
|
147
|
+
next
|
148
|
+
end
|
149
|
+
|
145
150
|
begin
|
146
151
|
debug "Stopping container #{cname}..."
|
147
152
|
container = Docker::Container.get(cname)
|
@@ -165,13 +170,11 @@ module Fidoci
|
|
165
170
|
end
|
166
171
|
|
167
172
|
def link_container_name(key)
|
168
|
-
"#{container_name}_#{key}"
|
173
|
+
links[key]['shared'] || "#{container_name}_#{key}"
|
169
174
|
end
|
170
175
|
|
171
176
|
# starts link containers and return dict name:container_name
|
172
177
|
def link_containers
|
173
|
-
links = env_config['links'] || []
|
174
|
-
|
175
178
|
links.map {|key, link_config|
|
176
179
|
[key, start_link(link_container_name(key), link_config)]
|
177
180
|
}
|
@@ -304,6 +307,15 @@ module Fidoci
|
|
304
307
|
}
|
305
308
|
end
|
306
309
|
|
310
|
+
if config['environment_pass']
|
311
|
+
config['environment_pass'].each{|key|
|
312
|
+
params['Env'] ||= []
|
313
|
+
params['Env'] << "#{key}=#{ENV[key]}"
|
314
|
+
|
315
|
+
puts "Warning: Passing environment variable #{key} is not locally set" unless ENV[key]
|
316
|
+
}
|
317
|
+
end
|
318
|
+
|
307
319
|
# volumes
|
308
320
|
if config['volumes']
|
309
321
|
config['volumes'].each {|v|
|
@@ -352,4 +364,4 @@ module Fidoci
|
|
352
364
|
success
|
353
365
|
end
|
354
366
|
end
|
355
|
-
end
|
367
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fidoci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Dolezal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|