dry-stack 0.0.86 → 0.0.88
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dry-stack/stack.rb +8 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae624210dd275eb7f62eb30f4023ea37dfde7689e84b80e9f98bf4d47f5d66b4
|
4
|
+
data.tar.gz: '0109ac07fea18f6f942ad66d71292fd52da1f27cc0b99c2834d1620b6bdb2c67'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07a69b0fc65be43c138f561eabff1a38525ceea703b43c368c292bbcd350bdff283f64b74f992aef6f7b0b97761af6ff7e594ee07b634900b1780ef559bae281
|
7
|
+
data.tar.gz: fc51afc785660c574d971374b300da2ba8ce67f9673b1d700822867ba7baefc89de0addba17c52e5b3da56c32bb2b2617233cf3337f3ee64ad5e925309f46b9f
|
data/lib/dry-stack/stack.rb
CHANGED
@@ -146,6 +146,8 @@ module Dry
|
|
146
146
|
|
147
147
|
compose[:services].each do |name, service|
|
148
148
|
|
149
|
+
service[:image].gsub!(/:latest$/, '') # let docker swarm to create tag: :latest@sha265:0000...
|
150
|
+
|
149
151
|
ingress = [@ingress[name], service[:ingress] || [] ].flatten.compact
|
150
152
|
|
151
153
|
service[:deploy] ||= {}
|
@@ -268,15 +270,18 @@ module Dry
|
|
268
270
|
end
|
269
271
|
|
270
272
|
compose[:configs].update(compose[:configs]) do |name, config|
|
273
|
+
# total config name must be max 64 characters length. MD5 - 32 characters
|
274
|
+
short_name = name[0..30]
|
275
|
+
|
271
276
|
if config[:file_content]
|
272
277
|
md5 = Digest::MD5.hexdigest config[:file_content]
|
273
|
-
fname = "./#{@name}.config.#{name}.#{md5}" # use MD5, when
|
278
|
+
fname = "./#{@name}.config.#{name}.#{md5}" # use MD5, when run in parallel may have different content
|
274
279
|
File.write fname, config[:file_content]
|
275
|
-
{name: "#{
|
280
|
+
{name: "#{short_name}-#{md5}", file: fname}.merge config.except(:file_content)
|
276
281
|
elsif config[:file]
|
277
282
|
body = File.read config[:file] rescue ''
|
278
283
|
md5 = Digest::MD5.hexdigest body
|
279
|
-
{name: "#{
|
284
|
+
{name: "#{short_name}-#{md5}", file: fname}.merge config
|
280
285
|
else
|
281
286
|
config
|
282
287
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.88
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artyom B
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|