dry-stack 0.1.2 → 0.1.4
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/command_compose.rb +0 -3
- data/lib/dry-stack/command_line.rb +4 -0
- data/lib/dry-stack/command_swarm_deploy.rb +3 -3
- data/lib/version.rb +1 -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: 36f7715c78b55d4cdb925f8546caf29c3f14f4a91226307ea9b2e2a49195101a
|
4
|
+
data.tar.gz: 00e3171fa38e008d72a9d397fe5225dd7b15ce76add02dcfb4eb85c1061d365d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e99e81d6a8bc9a23f0a5ab603d667967d16affc9ac3d0fa8b35497f03297d877f41f991f8604f5ccb0193e0e18d27cf6c128705ae9a00cdacc243769899a4c7
|
7
|
+
data.tar.gz: d41dd16da3b445009adc06cca9e654eb0bf7249ce3d033326939c36fd54afded2e3f6707bd844b6961eec4cd375ad5da26f6958fd1a9d0753f8c1f543ca1a652
|
@@ -5,9 +5,6 @@ Dry::CommandLine::COMMANDS[:to_compose] = Class.new do
|
|
5
5
|
_params = stack.options.merge params
|
6
6
|
yaml = stack.to_compose(_params ).lines[1..].join
|
7
7
|
$stdout.puts yaml
|
8
|
-
|
9
|
-
# substitute ENV variables
|
10
|
-
# _params[:'no-env'] ? $stdout.puts(yaml) : system("echo \"#{yaml.gsub("`", '\\\`')}\"")
|
11
8
|
end
|
12
9
|
|
13
10
|
def help = ['Print stack in docker compose format',
|
@@ -71,6 +71,7 @@ module Dry
|
|
71
71
|
o.on('', '--ingress', 'Generate ingress labels') { true }
|
72
72
|
o.on('', '--traefik', 'Generate traefik labels') { true }
|
73
73
|
o.on('', '--traefik-tls', 'Generate traefik tls labels') { true }
|
74
|
+
o.on('', '--tls-domain domain', 'Domain for the traefik labels')
|
74
75
|
o.on('', '--host-sed /from/to/', 'Sed ingress host /\\*/dev.*/')
|
75
76
|
o.on('-n', '--no-env', 'Deprecated') { $stderr.puts 'warning: deprecated option: -n' } # TODO: remove
|
76
77
|
o.on('-c', '--configuration name', 'Configuration name')
|
@@ -79,6 +80,9 @@ module Dry
|
|
79
80
|
o.on('-h', '--help') { puts o; exit }
|
80
81
|
o.parse! args, into: params
|
81
82
|
|
83
|
+
params.transform_keys!{_1.to_s.gsub('-','_').to_sym}
|
84
|
+
params[:traefik_tls] = true if params[:tls_domain]
|
85
|
+
|
82
86
|
raise 'Stack file not defined' if $stdin.tty? && !params[:stack]
|
83
87
|
|
84
88
|
command = args.shift || ''
|
@@ -9,10 +9,10 @@ Dry::CommandLine::COMMANDS[:swarm_deploy] = Class.new do
|
|
9
9
|
_params = stack.options.merge params
|
10
10
|
stack.name = _params[:name] if _params[:name]
|
11
11
|
|
12
|
-
if params[:
|
13
|
-
name = params[:
|
12
|
+
if params[:context_endpoint]
|
13
|
+
name = params[:context_endpoint].gsub( /[\/.:@]/,'_').gsub( '__','_')
|
14
14
|
name = "dry-#{name}".to_sym
|
15
|
-
endpoint = params[:
|
15
|
+
endpoint = params[:context_endpoint]
|
16
16
|
contexts = {}
|
17
17
|
exec_o_lines 'docker context ls --format json' do |line|
|
18
18
|
ctx = JSON.parse line, symbolize_names: true
|
data/lib/version.rb
CHANGED