dash 3.1.5 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -6
- data/bin/dash +2 -2
- data/lib/{kamal → dash}/cli/accessory.rb +24 -24
- data/lib/dash/cli/alias/command.rb +10 -0
- data/lib/{kamal → dash}/cli/app/assets.rb +2 -2
- data/lib/{kamal → dash}/cli/app/boot.rb +15 -15
- data/lib/{kamal → dash}/cli/app/error_pages.rb +6 -6
- data/lib/{kamal → dash}/cli/app/rollout_boot.rb +6 -6
- data/lib/{kamal → dash}/cli/app/ssl_certificates.rb +3 -3
- data/lib/{kamal → dash}/cli/app.rb +87 -87
- data/lib/{kamal → dash}/cli/base.rb +73 -49
- data/lib/dash/cli/build/clone.rb +59 -0
- data/lib/{kamal → dash}/cli/build/port_forwarding.rb +1 -1
- data/lib/{kamal → dash}/cli/build.rb +45 -45
- data/lib/{kamal → dash}/cli/doctor/config_checks.rb +3 -3
- data/lib/{kamal → dash}/cli/doctor/endpoint_checks.rb +25 -7
- data/lib/{kamal → dash}/cli/doctor/host_checks.rb +23 -23
- data/lib/{kamal → dash}/cli/doctor.rb +9 -9
- data/lib/{kamal → dash}/cli/healthcheck/barrier.rb +2 -2
- data/lib/{kamal → dash}/cli/healthcheck/drift_error.rb +2 -2
- data/lib/dash/cli/healthcheck/error.rb +2 -0
- data/lib/{kamal → dash}/cli/healthcheck/poller.rb +7 -7
- data/lib/{kamal → dash}/cli/lock.rb +1 -1
- data/lib/dash/cli/main/migrate.rb +77 -0
- data/lib/{kamal → dash}/cli/main.rb +87 -76
- data/lib/{kamal → dash}/cli/proxy/drift.rb +4 -4
- data/lib/{kamal → dash}/cli/proxy/loadbalancer_claim.rb +6 -6
- data/lib/{kamal → dash}/cli/proxy/loadbalancer_reboot.rb +23 -23
- data/lib/{kamal → dash}/cli/proxy/reboot.rb +15 -15
- data/lib/{kamal → dash}/cli/proxy.rb +172 -160
- data/lib/{kamal → dash}/cli/prune.rb +10 -10
- data/lib/{kamal → dash}/cli/registry.rb +13 -13
- data/lib/{kamal → dash}/cli/secrets.rb +3 -3
- data/lib/{kamal → dash}/cli/server.rb +15 -15
- data/lib/{kamal → dash}/cli/templates/deploy.yml +6 -6
- data/lib/dash/cli/templates/sample_hooks/docker-setup.sample +3 -0
- data/lib/dash/cli/templates/sample_hooks/post-app-boot.sample +3 -0
- data/lib/dash/cli/templates/sample_hooks/post-app-stop.sample +9 -0
- data/lib/dash/cli/templates/sample_hooks/post-deploy.sample +14 -0
- data/lib/dash/cli/templates/sample_hooks/post-proxy-deploy.sample +3 -0
- data/lib/dash/cli/templates/sample_hooks/post-proxy-reboot.sample +3 -0
- data/lib/dash/cli/templates/sample_hooks/pre-app-boot.sample +3 -0
- data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-app-stop.sample +2 -2
- data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-build.sample +8 -8
- data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-connect.sample +8 -8
- data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-deploy.sample +9 -9
- data/lib/dash/cli/templates/sample_hooks/pre-proxy-deploy.sample +3 -0
- data/lib/dash/cli/templates/sample_hooks/pre-proxy-reboot.sample +3 -0
- data/lib/dash/cli/templates/secrets +22 -0
- data/lib/{kamal → dash}/cli.rb +2 -2
- data/lib/{kamal → dash}/commander/specifics.rb +2 -2
- data/lib/{kamal → dash}/commander.rb +31 -23
- data/lib/{kamal → dash}/commands/accessory/proxy.rb +1 -1
- data/lib/{kamal → dash}/commands/accessory.rb +2 -2
- data/lib/{kamal → dash}/commands/app/assets.rb +1 -1
- data/lib/{kamal → dash}/commands/app/containers.rb +1 -1
- data/lib/{kamal → dash}/commands/app/error_pages.rb +2 -2
- data/lib/{kamal → dash}/commands/app/execution.rb +1 -1
- data/lib/{kamal → dash}/commands/app/images.rb +1 -1
- data/lib/{kamal → dash}/commands/app/logging.rb +1 -1
- data/lib/{kamal → dash}/commands/app/proxy.rb +1 -1
- data/lib/{kamal → dash}/commands/app.rb +1 -1
- data/lib/{kamal → dash}/commands/auditor.rb +3 -7
- data/lib/{kamal → dash}/commands/base.rb +39 -3
- data/lib/{kamal → dash}/commands/builder/base.rb +2 -2
- data/lib/{kamal → dash}/commands/builder/clone.rb +3 -3
- data/lib/{kamal → dash}/commands/builder/cloud.rb +1 -1
- data/lib/{kamal → dash}/commands/builder/hybrid.rb +1 -1
- data/lib/{kamal → dash}/commands/builder/local.rb +1 -1
- data/lib/{kamal → dash}/commands/builder/pack.rb +1 -1
- data/lib/{kamal → dash}/commands/builder/remote.rb +1 -1
- data/lib/{kamal → dash}/commands/builder.rb +7 -7
- data/lib/{kamal → dash}/commands/docker.rb +1 -1
- data/lib/{kamal → dash}/commands/hook.rb +1 -1
- data/lib/{kamal → dash}/commands/loadbalancer.rb +9 -8
- data/lib/{kamal → dash}/commands/lock.rb +2 -2
- data/lib/{kamal → dash}/commands/proxy/cert_transfer.rb +3 -3
- data/lib/{kamal → dash}/commands/proxy.rb +20 -10
- data/lib/{kamal → dash}/commands/prune.rb +1 -1
- data/lib/dash/commands/registry.rb +44 -0
- data/lib/{kamal → dash}/commands/server.rb +1 -5
- data/lib/dash/commands.rb +2 -0
- data/lib/{kamal → dash}/configuration/accessory.rb +11 -11
- data/lib/{kamal → dash}/configuration/alias.rb +3 -3
- data/lib/{kamal → dash}/configuration/boot.rb +2 -2
- data/lib/{kamal → dash}/configuration/builder.rb +7 -7
- data/lib/{kamal → dash}/configuration/docs/accessory.yml +6 -6
- data/lib/{kamal → dash}/configuration/docs/alias.yml +2 -2
- data/lib/{kamal → dash}/configuration/docs/boot.yml +1 -1
- data/lib/{kamal → dash}/configuration/docs/builder.yml +3 -3
- data/lib/{kamal → dash}/configuration/docs/configuration.yml +25 -18
- data/lib/{kamal → dash}/configuration/docs/env.yml +17 -17
- data/lib/{kamal → dash}/configuration/docs/proxy.yml +53 -30
- data/lib/{kamal → dash}/configuration/docs/registry.yml +6 -6
- data/lib/{kamal → dash}/configuration/docs/role.yml +1 -1
- data/lib/{kamal → dash}/configuration/docs/servers.yml +2 -2
- data/lib/{kamal → dash}/configuration/env/tag.rb +2 -2
- data/lib/{kamal → dash}/configuration/env.rb +5 -5
- data/lib/{kamal → dash}/configuration/loadbalancer.rb +3 -3
- data/lib/{kamal → dash}/configuration/logging.rb +3 -3
- data/lib/{kamal → dash}/configuration/output.rb +4 -4
- data/lib/{kamal → dash}/configuration/proxy/acme.rb +4 -3
- data/lib/{kamal → dash}/configuration/proxy/boot.rb +10 -8
- data/lib/{kamal → dash}/configuration/proxy/run.rb +14 -14
- data/lib/{kamal → dash}/configuration/proxy.rb +16 -16
- data/lib/{kamal → dash}/configuration/registry.rb +3 -3
- data/lib/{kamal → dash}/configuration/role/healthcheck.rb +3 -3
- data/lib/{kamal → dash}/configuration/role.rb +13 -13
- data/lib/{kamal → dash}/configuration/servers.rb +4 -4
- data/lib/{kamal → dash}/configuration/ssh.rb +3 -3
- data/lib/{kamal → dash}/configuration/sshkit.rb +2 -2
- data/lib/{kamal → dash}/configuration/validation.rb +2 -2
- data/lib/{kamal → dash}/configuration/validator/accessory.rb +1 -1
- data/lib/{kamal → dash}/configuration/validator/alias.rb +2 -2
- data/lib/{kamal → dash}/configuration/validator/builder.rb +1 -1
- data/lib/dash/configuration/validator/configuration.rb +6 -0
- data/lib/{kamal → dash}/configuration/validator/env.rb +2 -2
- data/lib/{kamal → dash}/configuration/validator/proxy.rb +8 -8
- data/lib/{kamal → dash}/configuration/validator/registry.rb +1 -1
- data/lib/{kamal → dash}/configuration/validator/role.rb +1 -1
- data/lib/{kamal → dash}/configuration/validator/servers.rb +1 -1
- data/lib/{kamal → dash}/configuration/validator.rb +4 -4
- data/lib/{kamal → dash}/configuration/volume.rb +2 -2
- data/lib/{kamal → dash}/configuration.rb +40 -30
- data/lib/{kamal → dash}/docker.rb +1 -1
- data/lib/{kamal → dash}/env_file.rb +1 -1
- data/lib/{kamal → dash}/git.rb +1 -1
- data/lib/{kamal → dash}/otel_shipper.rb +3 -3
- data/lib/{kamal → dash}/output/base_logger.rb +1 -1
- data/lib/{kamal → dash}/output/file_logger.rb +1 -1
- data/lib/{kamal → dash}/output/formatter.rb +1 -1
- data/lib/{kamal → dash}/output/otel_logger.rb +3 -3
- data/lib/dash/project_directory.rb +28 -0
- data/lib/{kamal → dash}/secrets/adapters/aws_secrets_manager.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/base.rb +2 -2
- data/lib/{kamal → dash}/secrets/adapters/bitwarden.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/bitwarden_secrets_manager.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/doppler.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/enpass.rb +3 -3
- data/lib/{kamal → dash}/secrets/adapters/gcp_secret_manager.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/last_pass.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/one_password.rb +2 -2
- data/lib/{kamal → dash}/secrets/adapters/passbolt.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters/test.rb +1 -1
- data/lib/{kamal → dash}/secrets/adapters.rb +2 -2
- data/lib/{kamal → dash}/secrets/dotenv/inline_command_substitution.rb +5 -3
- data/lib/{kamal → dash}/secrets.rb +6 -6
- data/lib/{kamal → dash}/tags.rb +8 -3
- data/lib/{kamal → dash}/utils/sensitive.rb +1 -1
- data/lib/{kamal → dash}/utils.rb +15 -5
- data/lib/dash/version.rb +3 -0
- data/lib/{kamal.rb → dash.rb} +5 -5
- metadata +171 -216
- data/bin/kamal +0 -18
- data/lib/kamal/cli/alias/command.rb +0 -10
- data/lib/kamal/cli/build/clone.rb +0 -59
- data/lib/kamal/cli/healthcheck/error.rb +0 -2
- data/lib/kamal/cli/templates/sample_hooks/docker-setup.sample +0 -3
- data/lib/kamal/cli/templates/sample_hooks/post-app-boot.sample +0 -3
- data/lib/kamal/cli/templates/sample_hooks/post-app-stop.sample +0 -9
- data/lib/kamal/cli/templates/sample_hooks/post-deploy.sample +0 -14
- data/lib/kamal/cli/templates/sample_hooks/post-proxy-deploy.sample +0 -3
- data/lib/kamal/cli/templates/sample_hooks/post-proxy-reboot.sample +0 -3
- data/lib/kamal/cli/templates/sample_hooks/pre-app-boot.sample +0 -3
- data/lib/kamal/cli/templates/sample_hooks/pre-proxy-deploy.sample +0 -3
- data/lib/kamal/cli/templates/sample_hooks/pre-proxy-reboot.sample +0 -3
- data/lib/kamal/cli/templates/secrets +0 -22
- data/lib/kamal/commands/registry.rb +0 -38
- data/lib/kamal/commands.rb +0 -2
- data/lib/kamal/configuration/validator/configuration.rb +0 -6
- data/lib/kamal/version.rb +0 -3
- /data/lib/{kamal → dash}/configuration/docs/logging.yml +0 -0
- /data/lib/{kamal → dash}/configuration/docs/output.yml +0 -0
- /data/lib/{kamal → dash}/configuration/docs/ssh.yml +0 -0
- /data/lib/{kamal → dash}/configuration/docs/sshkit.yml +0 -0
- /data/lib/{kamal → dash}/sshkit_with_ext.rb +0 -0
data/lib/{kamal → dash}/utils.rb
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require "active_support/core_ext/object/try"
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module Dash::Utils
|
|
4
4
|
extend self
|
|
5
5
|
|
|
6
6
|
DOLLAR_SIGN_WITHOUT_SHELL_EXPANSION_REGEX = /\$(?!{[^\}]*\})/
|
|
@@ -31,13 +31,13 @@ module Kamal::Utils
|
|
|
31
31
|
"--#{key}"
|
|
32
32
|
else
|
|
33
33
|
rendered = "--#{key}#{with}#{escape ? escape_shell_value(value) : value}"
|
|
34
|
-
value.is_a?(
|
|
34
|
+
value.is_a?(Dash::Utils::Sensitive) ? sensitive(rendered, redaction: "--#{key}#{with}#{value.redaction}") : rendered
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
else
|
|
38
38
|
flatten_args(args).collect do |(key, value)|
|
|
39
39
|
rendered = value == true ? nil : escape ? escape_shell_value(value) : value
|
|
40
|
-
rendered = sensitive(rendered, redaction: value.redaction) if value.is_a?(
|
|
40
|
+
rendered = sensitive(rendered, redaction: value.redaction) if value.is_a?(Dash::Utils::Sensitive)
|
|
41
41
|
[ "--#{key}", rendered ]
|
|
42
42
|
end
|
|
43
43
|
end
|
|
@@ -47,8 +47,18 @@ module Kamal::Utils
|
|
|
47
47
|
|
|
48
48
|
# kamal-proxy takes durations as Go duration strings; deploy.yml takes plain
|
|
49
49
|
# seconds. Zero is a real value (it disables the timeout), so only nil drops out.
|
|
50
|
+
#
|
|
51
|
+
# A value that already carries a unit is passed through untouched. Appending
|
|
52
|
+
# "s" to it would not just be redundant, it would change the meaning: "5m"
|
|
53
|
+
# would become "5ms", which Go parses happily as five milliseconds. An
|
|
54
|
+
# operator who writes a Go duration should get the duration they wrote or an
|
|
55
|
+
# error from the proxy, never a silently different one.
|
|
56
|
+
NUMERIC_DURATION = /\A-?\d+(\.\d+)?\z/
|
|
57
|
+
|
|
50
58
|
def seconds_duration(value)
|
|
51
|
-
|
|
59
|
+
return if value.nil?
|
|
60
|
+
|
|
61
|
+
value.to_s.match?(NUMERIC_DURATION) ? "#{value}s" : value.to_s
|
|
52
62
|
end
|
|
53
63
|
|
|
54
64
|
# Flattens a one-to-many structure into an array of two-element arrays each containing a key-value pair
|
|
@@ -60,7 +70,7 @@ module Kamal::Utils
|
|
|
60
70
|
# Pass `redaction:` to change the default `"[REDACTED]"` redaction, e.g.
|
|
61
71
|
# `sensitive "#{arg}=#{secret}", redaction: "#{arg}=xxxx"
|
|
62
72
|
def sensitive(...)
|
|
63
|
-
|
|
73
|
+
Dash::Utils::Sensitive.new(...)
|
|
64
74
|
end
|
|
65
75
|
|
|
66
76
|
def redacted(value)
|
data/lib/dash/version.rb
ADDED
data/lib/{kamal.rb → dash.rb}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module
|
|
1
|
+
module Dash
|
|
2
2
|
class ConfigurationError < StandardError; end
|
|
3
3
|
end
|
|
4
4
|
|
|
@@ -8,11 +8,11 @@ require "yaml"
|
|
|
8
8
|
require "tmpdir"
|
|
9
9
|
require "pathname"
|
|
10
10
|
require "uri"
|
|
11
|
-
# Proxy::Run.digest reaches for Digest::SHA256 from inside `on(
|
|
11
|
+
# Proxy::Run.digest reaches for Digest::SHA256 from inside `on(DASH.proxy_hosts)`,
|
|
12
12
|
# so the first reference happens in several SSHKit threads at once. Digest defines
|
|
13
13
|
# SHA256 lazily — `Digest.const_missing(:SHA256)` runs `require "digest/sha2"`, and
|
|
14
14
|
# that path is not mutex-guarded — so the threads race it and one loses with
|
|
15
|
-
# "Digest::Base cannot be directly inherited in Ruby", failing `
|
|
15
|
+
# "Digest::Base cannot be directly inherited in Ruby", failing `dash proxy boot`
|
|
16
16
|
# on a random host.
|
|
17
17
|
#
|
|
18
18
|
# Requiring "digest" alone does NOT fix this: it defines the module but leaves
|
|
@@ -21,6 +21,6 @@ require "uri"
|
|
|
21
21
|
require "digest/sha2"
|
|
22
22
|
|
|
23
23
|
loader = Zeitwerk::Loader.for_gem
|
|
24
|
-
loader.ignore(File.join(__dir__, "
|
|
24
|
+
loader.ignore(File.join(__dir__, "dash", "sshkit_with_ext.rb"))
|
|
25
25
|
loader.setup
|
|
26
|
-
loader.eager_load_namespace(
|
|
26
|
+
loader.eager_load_namespace(Dash::Cli) # We need all commands loaded.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dash
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1
|
|
4
|
+
version: 3.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mikael Henriksson
|
|
@@ -16,6 +16,9 @@ dependencies:
|
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '7.0'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '10'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -23,6 +26,9 @@ dependencies:
|
|
|
23
26
|
- - ">="
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: '7.0'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '10'
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: sshkit
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -161,230 +167,179 @@ dependencies:
|
|
|
161
167
|
- - "~>"
|
|
162
168
|
- !ruby/object:Gem::Version
|
|
163
169
|
version: '0.2'
|
|
164
|
-
|
|
165
|
-
name: debug
|
|
166
|
-
requirement: !ruby/object:Gem::Requirement
|
|
167
|
-
requirements:
|
|
168
|
-
- - ">="
|
|
169
|
-
- !ruby/object:Gem::Version
|
|
170
|
-
version: '0'
|
|
171
|
-
type: :development
|
|
172
|
-
prerelease: false
|
|
173
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
174
|
-
requirements:
|
|
175
|
-
- - ">="
|
|
176
|
-
- !ruby/object:Gem::Version
|
|
177
|
-
version: '0'
|
|
178
|
-
- !ruby/object:Gem::Dependency
|
|
179
|
-
name: minitest
|
|
180
|
-
requirement: !ruby/object:Gem::Requirement
|
|
181
|
-
requirements:
|
|
182
|
-
- - "<"
|
|
183
|
-
- !ruby/object:Gem::Version
|
|
184
|
-
version: '6'
|
|
185
|
-
type: :development
|
|
186
|
-
prerelease: false
|
|
187
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
188
|
-
requirements:
|
|
189
|
-
- - "<"
|
|
190
|
-
- !ruby/object:Gem::Version
|
|
191
|
-
version: '6'
|
|
192
|
-
- !ruby/object:Gem::Dependency
|
|
193
|
-
name: mocha
|
|
194
|
-
requirement: !ruby/object:Gem::Requirement
|
|
195
|
-
requirements:
|
|
196
|
-
- - ">="
|
|
197
|
-
- !ruby/object:Gem::Version
|
|
198
|
-
version: '0'
|
|
199
|
-
type: :development
|
|
200
|
-
prerelease: false
|
|
201
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
202
|
-
requirements:
|
|
203
|
-
- - ">="
|
|
204
|
-
- !ruby/object:Gem::Version
|
|
205
|
-
version: '0'
|
|
206
|
-
- !ruby/object:Gem::Dependency
|
|
207
|
-
name: railties
|
|
208
|
-
requirement: !ruby/object:Gem::Requirement
|
|
209
|
-
requirements:
|
|
210
|
-
- - ">="
|
|
211
|
-
- !ruby/object:Gem::Version
|
|
212
|
-
version: '0'
|
|
213
|
-
type: :development
|
|
214
|
-
prerelease: false
|
|
215
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
216
|
-
requirements:
|
|
217
|
-
- - ">="
|
|
218
|
-
- !ruby/object:Gem::Version
|
|
219
|
-
version: '0'
|
|
220
|
-
email: mikael@mhenrixon.com
|
|
170
|
+
email: mikael@zoolutions.llc
|
|
221
171
|
executables:
|
|
222
172
|
- dash
|
|
223
|
-
- kamal
|
|
224
173
|
extensions: []
|
|
225
174
|
extra_rdoc_files: []
|
|
226
175
|
files:
|
|
227
176
|
- MIT-LICENSE
|
|
228
177
|
- README.md
|
|
229
178
|
- bin/dash
|
|
230
|
-
-
|
|
231
|
-
- lib/
|
|
232
|
-
- lib/
|
|
233
|
-
- lib/
|
|
234
|
-
- lib/
|
|
235
|
-
- lib/
|
|
236
|
-
- lib/
|
|
237
|
-
- lib/
|
|
238
|
-
- lib/
|
|
239
|
-
- lib/
|
|
240
|
-
- lib/
|
|
241
|
-
- lib/
|
|
242
|
-
- lib/
|
|
243
|
-
- lib/
|
|
244
|
-
- lib/
|
|
245
|
-
- lib/
|
|
246
|
-
- lib/
|
|
247
|
-
- lib/
|
|
248
|
-
- lib/
|
|
249
|
-
- lib/
|
|
250
|
-
- lib/
|
|
251
|
-
- lib/
|
|
252
|
-
- lib/
|
|
253
|
-
- lib/
|
|
254
|
-
- lib/
|
|
255
|
-
- lib/
|
|
256
|
-
- lib/
|
|
257
|
-
- lib/
|
|
258
|
-
- lib/
|
|
259
|
-
- lib/
|
|
260
|
-
- lib/
|
|
261
|
-
- lib/
|
|
262
|
-
- lib/
|
|
263
|
-
- lib/
|
|
264
|
-
- lib/
|
|
265
|
-
- lib/
|
|
266
|
-
- lib/
|
|
267
|
-
- lib/
|
|
268
|
-
- lib/
|
|
269
|
-
- lib/
|
|
270
|
-
- lib/
|
|
271
|
-
- lib/
|
|
272
|
-
- lib/
|
|
273
|
-
- lib/
|
|
274
|
-
- lib/
|
|
275
|
-
- lib/
|
|
276
|
-
- lib/
|
|
277
|
-
- lib/
|
|
278
|
-
- lib/
|
|
279
|
-
- lib/
|
|
280
|
-
- lib/
|
|
281
|
-
- lib/
|
|
282
|
-
- lib/
|
|
283
|
-
- lib/
|
|
284
|
-
- lib/
|
|
285
|
-
- lib/
|
|
286
|
-
- lib/
|
|
287
|
-
- lib/
|
|
288
|
-
- lib/
|
|
289
|
-
- lib/
|
|
290
|
-
- lib/
|
|
291
|
-
- lib/
|
|
292
|
-
- lib/
|
|
293
|
-
- lib/
|
|
294
|
-
- lib/
|
|
295
|
-
- lib/
|
|
296
|
-
- lib/
|
|
297
|
-
- lib/
|
|
298
|
-
- lib/
|
|
299
|
-
- lib/
|
|
300
|
-
- lib/
|
|
301
|
-
- lib/
|
|
302
|
-
- lib/
|
|
303
|
-
- lib/
|
|
304
|
-
- lib/
|
|
305
|
-
- lib/
|
|
306
|
-
- lib/
|
|
307
|
-
- lib/
|
|
308
|
-
- lib/
|
|
309
|
-
- lib/
|
|
310
|
-
- lib/
|
|
311
|
-
- lib/
|
|
312
|
-
- lib/
|
|
313
|
-
- lib/
|
|
314
|
-
- lib/
|
|
315
|
-
- lib/
|
|
316
|
-
- lib/
|
|
317
|
-
- lib/
|
|
318
|
-
- lib/
|
|
319
|
-
- lib/
|
|
320
|
-
- lib/
|
|
321
|
-
- lib/
|
|
322
|
-
- lib/
|
|
323
|
-
- lib/
|
|
324
|
-
- lib/
|
|
325
|
-
- lib/
|
|
326
|
-
- lib/
|
|
327
|
-
- lib/
|
|
328
|
-
- lib/
|
|
329
|
-
- lib/
|
|
330
|
-
- lib/
|
|
331
|
-
- lib/
|
|
332
|
-
- lib/
|
|
333
|
-
- lib/
|
|
334
|
-
- lib/
|
|
335
|
-
- lib/
|
|
336
|
-
- lib/
|
|
337
|
-
- lib/
|
|
338
|
-
- lib/
|
|
339
|
-
- lib/
|
|
340
|
-
- lib/
|
|
341
|
-
- lib/
|
|
342
|
-
- lib/
|
|
343
|
-
- lib/
|
|
344
|
-
- lib/
|
|
345
|
-
- lib/
|
|
346
|
-
- lib/
|
|
347
|
-
- lib/
|
|
348
|
-
- lib/
|
|
349
|
-
- lib/
|
|
350
|
-
- lib/
|
|
351
|
-
- lib/
|
|
352
|
-
- lib/
|
|
353
|
-
- lib/
|
|
354
|
-
- lib/
|
|
355
|
-
- lib/
|
|
356
|
-
- lib/
|
|
357
|
-
- lib/
|
|
358
|
-
- lib/
|
|
359
|
-
- lib/
|
|
360
|
-
- lib/
|
|
361
|
-
- lib/
|
|
362
|
-
- lib/
|
|
363
|
-
- lib/
|
|
364
|
-
- lib/
|
|
365
|
-
- lib/
|
|
366
|
-
- lib/
|
|
367
|
-
- lib/
|
|
368
|
-
- lib/
|
|
369
|
-
- lib/
|
|
370
|
-
- lib/
|
|
371
|
-
- lib/
|
|
372
|
-
- lib/
|
|
373
|
-
- lib/
|
|
374
|
-
- lib/
|
|
375
|
-
- lib/
|
|
376
|
-
- lib/
|
|
377
|
-
- lib/
|
|
378
|
-
- lib/
|
|
379
|
-
- lib/
|
|
380
|
-
- lib/
|
|
381
|
-
- lib/
|
|
382
|
-
- lib/
|
|
383
|
-
- lib/
|
|
384
|
-
|
|
179
|
+
- lib/dash.rb
|
|
180
|
+
- lib/dash/cli.rb
|
|
181
|
+
- lib/dash/cli/accessory.rb
|
|
182
|
+
- lib/dash/cli/alias/command.rb
|
|
183
|
+
- lib/dash/cli/app.rb
|
|
184
|
+
- lib/dash/cli/app/assets.rb
|
|
185
|
+
- lib/dash/cli/app/boot.rb
|
|
186
|
+
- lib/dash/cli/app/error_pages.rb
|
|
187
|
+
- lib/dash/cli/app/rollout_boot.rb
|
|
188
|
+
- lib/dash/cli/app/ssl_certificates.rb
|
|
189
|
+
- lib/dash/cli/base.rb
|
|
190
|
+
- lib/dash/cli/build.rb
|
|
191
|
+
- lib/dash/cli/build/clone.rb
|
|
192
|
+
- lib/dash/cli/build/port_forwarding.rb
|
|
193
|
+
- lib/dash/cli/doctor.rb
|
|
194
|
+
- lib/dash/cli/doctor/config_checks.rb
|
|
195
|
+
- lib/dash/cli/doctor/endpoint_checks.rb
|
|
196
|
+
- lib/dash/cli/doctor/host_checks.rb
|
|
197
|
+
- lib/dash/cli/healthcheck/barrier.rb
|
|
198
|
+
- lib/dash/cli/healthcheck/drift_error.rb
|
|
199
|
+
- lib/dash/cli/healthcheck/error.rb
|
|
200
|
+
- lib/dash/cli/healthcheck/poller.rb
|
|
201
|
+
- lib/dash/cli/lock.rb
|
|
202
|
+
- lib/dash/cli/main.rb
|
|
203
|
+
- lib/dash/cli/main/migrate.rb
|
|
204
|
+
- lib/dash/cli/proxy.rb
|
|
205
|
+
- lib/dash/cli/proxy/drift.rb
|
|
206
|
+
- lib/dash/cli/proxy/loadbalancer_claim.rb
|
|
207
|
+
- lib/dash/cli/proxy/loadbalancer_reboot.rb
|
|
208
|
+
- lib/dash/cli/proxy/reboot.rb
|
|
209
|
+
- lib/dash/cli/prune.rb
|
|
210
|
+
- lib/dash/cli/registry.rb
|
|
211
|
+
- lib/dash/cli/secrets.rb
|
|
212
|
+
- lib/dash/cli/server.rb
|
|
213
|
+
- lib/dash/cli/templates/deploy.yml
|
|
214
|
+
- lib/dash/cli/templates/sample_hooks/docker-setup.sample
|
|
215
|
+
- lib/dash/cli/templates/sample_hooks/post-app-boot.sample
|
|
216
|
+
- lib/dash/cli/templates/sample_hooks/post-app-stop.sample
|
|
217
|
+
- lib/dash/cli/templates/sample_hooks/post-deploy.sample
|
|
218
|
+
- lib/dash/cli/templates/sample_hooks/post-proxy-deploy.sample
|
|
219
|
+
- lib/dash/cli/templates/sample_hooks/post-proxy-reboot.sample
|
|
220
|
+
- lib/dash/cli/templates/sample_hooks/pre-app-boot.sample
|
|
221
|
+
- lib/dash/cli/templates/sample_hooks/pre-app-stop.sample
|
|
222
|
+
- lib/dash/cli/templates/sample_hooks/pre-build.sample
|
|
223
|
+
- lib/dash/cli/templates/sample_hooks/pre-connect.sample
|
|
224
|
+
- lib/dash/cli/templates/sample_hooks/pre-deploy.sample
|
|
225
|
+
- lib/dash/cli/templates/sample_hooks/pre-proxy-deploy.sample
|
|
226
|
+
- lib/dash/cli/templates/sample_hooks/pre-proxy-reboot.sample
|
|
227
|
+
- lib/dash/cli/templates/secrets
|
|
228
|
+
- lib/dash/commander.rb
|
|
229
|
+
- lib/dash/commander/specifics.rb
|
|
230
|
+
- lib/dash/commands.rb
|
|
231
|
+
- lib/dash/commands/accessory.rb
|
|
232
|
+
- lib/dash/commands/accessory/proxy.rb
|
|
233
|
+
- lib/dash/commands/app.rb
|
|
234
|
+
- lib/dash/commands/app/assets.rb
|
|
235
|
+
- lib/dash/commands/app/containers.rb
|
|
236
|
+
- lib/dash/commands/app/error_pages.rb
|
|
237
|
+
- lib/dash/commands/app/execution.rb
|
|
238
|
+
- lib/dash/commands/app/images.rb
|
|
239
|
+
- lib/dash/commands/app/logging.rb
|
|
240
|
+
- lib/dash/commands/app/proxy.rb
|
|
241
|
+
- lib/dash/commands/auditor.rb
|
|
242
|
+
- lib/dash/commands/base.rb
|
|
243
|
+
- lib/dash/commands/builder.rb
|
|
244
|
+
- lib/dash/commands/builder/base.rb
|
|
245
|
+
- lib/dash/commands/builder/clone.rb
|
|
246
|
+
- lib/dash/commands/builder/cloud.rb
|
|
247
|
+
- lib/dash/commands/builder/hybrid.rb
|
|
248
|
+
- lib/dash/commands/builder/local.rb
|
|
249
|
+
- lib/dash/commands/builder/pack.rb
|
|
250
|
+
- lib/dash/commands/builder/remote.rb
|
|
251
|
+
- lib/dash/commands/docker.rb
|
|
252
|
+
- lib/dash/commands/hook.rb
|
|
253
|
+
- lib/dash/commands/loadbalancer.rb
|
|
254
|
+
- lib/dash/commands/lock.rb
|
|
255
|
+
- lib/dash/commands/proxy.rb
|
|
256
|
+
- lib/dash/commands/proxy/cert_transfer.rb
|
|
257
|
+
- lib/dash/commands/prune.rb
|
|
258
|
+
- lib/dash/commands/registry.rb
|
|
259
|
+
- lib/dash/commands/server.rb
|
|
260
|
+
- lib/dash/configuration.rb
|
|
261
|
+
- lib/dash/configuration/accessory.rb
|
|
262
|
+
- lib/dash/configuration/alias.rb
|
|
263
|
+
- lib/dash/configuration/boot.rb
|
|
264
|
+
- lib/dash/configuration/builder.rb
|
|
265
|
+
- lib/dash/configuration/docs/accessory.yml
|
|
266
|
+
- lib/dash/configuration/docs/alias.yml
|
|
267
|
+
- lib/dash/configuration/docs/boot.yml
|
|
268
|
+
- lib/dash/configuration/docs/builder.yml
|
|
269
|
+
- lib/dash/configuration/docs/configuration.yml
|
|
270
|
+
- lib/dash/configuration/docs/env.yml
|
|
271
|
+
- lib/dash/configuration/docs/logging.yml
|
|
272
|
+
- lib/dash/configuration/docs/output.yml
|
|
273
|
+
- lib/dash/configuration/docs/proxy.yml
|
|
274
|
+
- lib/dash/configuration/docs/registry.yml
|
|
275
|
+
- lib/dash/configuration/docs/role.yml
|
|
276
|
+
- lib/dash/configuration/docs/servers.yml
|
|
277
|
+
- lib/dash/configuration/docs/ssh.yml
|
|
278
|
+
- lib/dash/configuration/docs/sshkit.yml
|
|
279
|
+
- lib/dash/configuration/env.rb
|
|
280
|
+
- lib/dash/configuration/env/tag.rb
|
|
281
|
+
- lib/dash/configuration/loadbalancer.rb
|
|
282
|
+
- lib/dash/configuration/logging.rb
|
|
283
|
+
- lib/dash/configuration/output.rb
|
|
284
|
+
- lib/dash/configuration/proxy.rb
|
|
285
|
+
- lib/dash/configuration/proxy/acme.rb
|
|
286
|
+
- lib/dash/configuration/proxy/boot.rb
|
|
287
|
+
- lib/dash/configuration/proxy/run.rb
|
|
288
|
+
- lib/dash/configuration/registry.rb
|
|
289
|
+
- lib/dash/configuration/role.rb
|
|
290
|
+
- lib/dash/configuration/role/healthcheck.rb
|
|
291
|
+
- lib/dash/configuration/servers.rb
|
|
292
|
+
- lib/dash/configuration/ssh.rb
|
|
293
|
+
- lib/dash/configuration/sshkit.rb
|
|
294
|
+
- lib/dash/configuration/validation.rb
|
|
295
|
+
- lib/dash/configuration/validator.rb
|
|
296
|
+
- lib/dash/configuration/validator/accessory.rb
|
|
297
|
+
- lib/dash/configuration/validator/alias.rb
|
|
298
|
+
- lib/dash/configuration/validator/builder.rb
|
|
299
|
+
- lib/dash/configuration/validator/configuration.rb
|
|
300
|
+
- lib/dash/configuration/validator/env.rb
|
|
301
|
+
- lib/dash/configuration/validator/proxy.rb
|
|
302
|
+
- lib/dash/configuration/validator/registry.rb
|
|
303
|
+
- lib/dash/configuration/validator/role.rb
|
|
304
|
+
- lib/dash/configuration/validator/servers.rb
|
|
305
|
+
- lib/dash/configuration/volume.rb
|
|
306
|
+
- lib/dash/docker.rb
|
|
307
|
+
- lib/dash/env_file.rb
|
|
308
|
+
- lib/dash/git.rb
|
|
309
|
+
- lib/dash/otel_shipper.rb
|
|
310
|
+
- lib/dash/output/base_logger.rb
|
|
311
|
+
- lib/dash/output/file_logger.rb
|
|
312
|
+
- lib/dash/output/formatter.rb
|
|
313
|
+
- lib/dash/output/otel_logger.rb
|
|
314
|
+
- lib/dash/project_directory.rb
|
|
315
|
+
- lib/dash/secrets.rb
|
|
316
|
+
- lib/dash/secrets/adapters.rb
|
|
317
|
+
- lib/dash/secrets/adapters/aws_secrets_manager.rb
|
|
318
|
+
- lib/dash/secrets/adapters/base.rb
|
|
319
|
+
- lib/dash/secrets/adapters/bitwarden.rb
|
|
320
|
+
- lib/dash/secrets/adapters/bitwarden_secrets_manager.rb
|
|
321
|
+
- lib/dash/secrets/adapters/doppler.rb
|
|
322
|
+
- lib/dash/secrets/adapters/enpass.rb
|
|
323
|
+
- lib/dash/secrets/adapters/gcp_secret_manager.rb
|
|
324
|
+
- lib/dash/secrets/adapters/last_pass.rb
|
|
325
|
+
- lib/dash/secrets/adapters/one_password.rb
|
|
326
|
+
- lib/dash/secrets/adapters/passbolt.rb
|
|
327
|
+
- lib/dash/secrets/adapters/test.rb
|
|
328
|
+
- lib/dash/secrets/dotenv/inline_command_substitution.rb
|
|
329
|
+
- lib/dash/sshkit_with_ext.rb
|
|
330
|
+
- lib/dash/tags.rb
|
|
331
|
+
- lib/dash/utils.rb
|
|
332
|
+
- lib/dash/utils/sensitive.rb
|
|
333
|
+
- lib/dash/version.rb
|
|
334
|
+
homepage: https://github.com/zoolutions/dash
|
|
385
335
|
licenses:
|
|
386
336
|
- MIT
|
|
387
|
-
metadata:
|
|
337
|
+
metadata:
|
|
338
|
+
homepage_uri: https://github.com/zoolutions/dash
|
|
339
|
+
source_code_uri: https://github.com/zoolutions/dash/tree/main
|
|
340
|
+
changelog_uri: https://github.com/zoolutions/dash/releases
|
|
341
|
+
bug_tracker_uri: https://github.com/zoolutions/dash/issues
|
|
342
|
+
rubygems_mfa_required: 'true'
|
|
388
343
|
rdoc_options: []
|
|
389
344
|
require_paths:
|
|
390
345
|
- lib
|
|
@@ -399,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
399
354
|
- !ruby/object:Gem::Version
|
|
400
355
|
version: '0'
|
|
401
356
|
requirements: []
|
|
402
|
-
rubygems_version:
|
|
357
|
+
rubygems_version: 3.6.9
|
|
403
358
|
specification_version: 4
|
|
404
359
|
summary: Deploy web apps in containers to servers running Docker with zero downtime.
|
|
405
360
|
test_files: []
|
data/bin/kamal
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
# Prevent failures from being reported twice.
|
|
4
|
-
Thread.report_on_exception = false
|
|
5
|
-
|
|
6
|
-
require "kamal"
|
|
7
|
-
|
|
8
|
-
begin
|
|
9
|
-
Kamal::Cli::Main.start(ARGV)
|
|
10
|
-
rescue SSHKit::Runner::ExecuteError => e
|
|
11
|
-
puts " \e[31mERROR (#{e.cause.class}): #{e.message}\e[0m"
|
|
12
|
-
puts e.cause.backtrace if ENV["VERBOSE"]
|
|
13
|
-
exit 1
|
|
14
|
-
rescue => e
|
|
15
|
-
puts " \e[31mERROR (#{e.class}): #{e.message}\e[0m"
|
|
16
|
-
puts e.backtrace if ENV["VERBOSE"]
|
|
17
|
-
exit 1
|
|
18
|
-
end
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
class Kamal::Cli::Build::Clone
|
|
2
|
-
attr_reader :sshkit
|
|
3
|
-
delegate :info, :error, :execute, :capture_with_info, to: :sshkit
|
|
4
|
-
|
|
5
|
-
def initialize(sshkit)
|
|
6
|
-
@sshkit = sshkit
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def prepare
|
|
10
|
-
begin
|
|
11
|
-
clone_repo
|
|
12
|
-
rescue SSHKit::Command::Failed => e
|
|
13
|
-
if e.message =~ /already exists and is not an empty directory/
|
|
14
|
-
reset
|
|
15
|
-
else
|
|
16
|
-
raise Kamal::Cli::Build::BuildError, "Failed to clone repo: #{e.message}"
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
validate!
|
|
21
|
-
rescue Kamal::Cli::Build::BuildError => e
|
|
22
|
-
error "Error preparing clone: #{e.message}, deleting and retrying..."
|
|
23
|
-
|
|
24
|
-
FileUtils.rm_rf KAMAL.config.builder.clone_directory
|
|
25
|
-
clone_repo
|
|
26
|
-
validate!
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
def clone_repo
|
|
31
|
-
info "Cloning repo into build directory `#{KAMAL.config.builder.build_directory}`..."
|
|
32
|
-
|
|
33
|
-
FileUtils.mkdir_p KAMAL.config.builder.clone_directory
|
|
34
|
-
execute *KAMAL.builder.clone
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def reset
|
|
38
|
-
info "Resetting local clone as `#{KAMAL.config.builder.build_directory}` already exists..."
|
|
39
|
-
|
|
40
|
-
KAMAL.builder.clone_reset_steps.each { |step| execute *step }
|
|
41
|
-
rescue SSHKit::Command::Failed => e
|
|
42
|
-
raise Kamal::Cli::Build::BuildError, "Failed to clone repo: #{e.message}"
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def validate!
|
|
46
|
-
status = capture_with_info(*KAMAL.builder.clone_status).strip
|
|
47
|
-
|
|
48
|
-
unless status.empty?
|
|
49
|
-
raise Kamal::Cli::Build::BuildError, "Clone in #{KAMAL.config.builder.build_directory} is dirty, #{status}"
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
revision = capture_with_info(*KAMAL.builder.clone_revision).strip
|
|
53
|
-
if revision != Kamal::Git.revision
|
|
54
|
-
raise Kamal::Cli::Build::BuildError, "Clone in #{KAMAL.config.builder.build_directory} is not on the correct revision, expected `#{Kamal::Git.revision}` but got `#{revision}`"
|
|
55
|
-
end
|
|
56
|
-
rescue SSHKit::Command::Failed => e
|
|
57
|
-
raise Kamal::Cli::Build::BuildError, "Failed to validate clone: #{e.message}"
|
|
58
|
-
end
|
|
59
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
|
|
3
|
-
# Runs on each host just after the previous container has been stopped.
|
|
4
|
-
#
|
|
5
|
-
# NOTE: $KAMAL_VERSION is the version that was STOPPED, not the one being deployed.
|
|
6
|
-
#
|
|
7
|
-
# A failure here is logged and the deploy continues.
|
|
8
|
-
|
|
9
|
-
echo "Stopped $KAMAL_ROLE version $KAMAL_VERSION on $KAMAL_HOSTS"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
|
|
3
|
-
# A sample post-deploy hook
|
|
4
|
-
#
|
|
5
|
-
# These environment variables are available:
|
|
6
|
-
# KAMAL_RECORDED_AT
|
|
7
|
-
# KAMAL_PERFORMER
|
|
8
|
-
# KAMAL_VERSION
|
|
9
|
-
# KAMAL_HOSTS
|
|
10
|
-
# KAMAL_ROLES (if set)
|
|
11
|
-
# KAMAL_DESTINATION (if set)
|
|
12
|
-
# KAMAL_RUNTIME
|
|
13
|
-
|
|
14
|
-
echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
|