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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0030379ed099994251cd619cde54371206b3cc12028e7fb2a17b6d56296f0e37'
4
- data.tar.gz: 6aa330ee8d7456a70eba51f961a4084c5a466b3ff0e3dfd819dc58ffa24452d4
3
+ metadata.gz: ae624210dd275eb7f62eb30f4023ea37dfde7689e84b80e9f98bf4d47f5d66b4
4
+ data.tar.gz: '0109ac07fea18f6f942ad66d71292fd52da1f27cc0b99c2834d1620b6bdb2c67'
5
5
  SHA512:
6
- metadata.gz: 57a60be8b72a438f818904b412970e49f26fbe049cb5a926ca30d3d8414b7e7cdba1aded7c7b7d00efbcb6a2f873807a0f11a4c8b1bf339c9ca1400802e09315
7
- data.tar.gz: 6a7359355a1068dda4ef13873742ae3603925c868cf55b1a30ec98a798a2e11850dfad3846bfbd4938d9419d0aec734d90181b8f240573dcb44d5f4e2ff57c18
6
+ metadata.gz: 07a69b0fc65be43c138f561eabff1a38525ceea703b43c368c292bbcd350bdff283f64b74f992aef6f7b0b97761af6ff7e594ee07b634900b1780ef559bae281
7
+ data.tar.gz: fc51afc785660c574d971374b300da2ba8ce67f9673b1d700822867ba7baefc89de0addba17c52e5b3da56c32bb2b2617233cf3337f3ee64ad5e925309f46b9f
@@ -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 rn in parallel may have different content
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: "#{name}-#{md5}", file: fname}.merge config.except(:file_content)
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: "#{name}-#{md5}", file: fname}.merge config
284
+ {name: "#{short_name}-#{md5}", file: fname}.merge config
280
285
  else
281
286
  config
282
287
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Stack
3
- VERSION = '0.0.86'
3
+ VERSION = '0.0.88'
4
4
  end
5
5
  end
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.86
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-10 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake