dash 3.2.0 → 4.0.0

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.
Files changed (178) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/dash +2 -2
  4. data/lib/{kamal → dash}/cli/accessory.rb +24 -24
  5. data/lib/dash/cli/alias/command.rb +10 -0
  6. data/lib/{kamal → dash}/cli/app/assets.rb +2 -2
  7. data/lib/{kamal → dash}/cli/app/boot.rb +16 -16
  8. data/lib/{kamal → dash}/cli/app/error_pages.rb +6 -6
  9. data/lib/{kamal → dash}/cli/app/rollout_boot.rb +6 -6
  10. data/lib/{kamal → dash}/cli/app/ssl_certificates.rb +3 -3
  11. data/lib/{kamal → dash}/cli/app.rb +87 -87
  12. data/lib/{kamal → dash}/cli/base.rb +72 -48
  13. data/lib/dash/cli/build/clone.rb +59 -0
  14. data/lib/{kamal → dash}/cli/build/port_forwarding.rb +1 -1
  15. data/lib/{kamal → dash}/cli/build.rb +45 -45
  16. data/lib/{kamal → dash}/cli/doctor/config_checks.rb +3 -3
  17. data/lib/{kamal → dash}/cli/doctor/endpoint_checks.rb +26 -8
  18. data/lib/{kamal → dash}/cli/doctor/host_checks.rb +22 -22
  19. data/lib/{kamal → dash}/cli/doctor.rb +9 -9
  20. data/lib/{kamal → dash}/cli/healthcheck/barrier.rb +2 -2
  21. data/lib/{kamal → dash}/cli/healthcheck/drift_error.rb +2 -2
  22. data/lib/dash/cli/healthcheck/error.rb +2 -0
  23. data/lib/{kamal → dash}/cli/healthcheck/poller.rb +7 -7
  24. data/lib/{kamal → dash}/cli/lock.rb +1 -1
  25. data/lib/dash/cli/main/migrate.rb +77 -0
  26. data/lib/{kamal → dash}/cli/main.rb +82 -71
  27. data/lib/{kamal → dash}/cli/proxy/drift.rb +3 -3
  28. data/lib/dash/cli/proxy/legacy_rename.rb +58 -0
  29. data/lib/{kamal → dash}/cli/proxy/loadbalancer_claim.rb +3 -3
  30. data/lib/{kamal → dash}/cli/proxy/loadbalancer_reboot.rb +23 -23
  31. data/lib/{kamal → dash}/cli/proxy/reboot.rb +21 -21
  32. data/lib/{kamal → dash}/cli/proxy.rb +178 -162
  33. data/lib/{kamal → dash}/cli/prune.rb +10 -10
  34. data/lib/{kamal → dash}/cli/registry.rb +11 -11
  35. data/lib/{kamal → dash}/cli/secrets.rb +3 -3
  36. data/lib/{kamal → dash}/cli/server.rb +14 -14
  37. data/lib/{kamal → dash}/cli/templates/deploy.yml +4 -4
  38. data/lib/dash/cli/templates/sample_hooks/docker-setup.sample +3 -0
  39. data/lib/dash/cli/templates/sample_hooks/post-app-boot.sample +3 -0
  40. data/lib/dash/cli/templates/sample_hooks/post-app-stop.sample +9 -0
  41. data/lib/dash/cli/templates/sample_hooks/post-deploy.sample +14 -0
  42. data/lib/dash/cli/templates/sample_hooks/post-proxy-deploy.sample +3 -0
  43. data/lib/dash/cli/templates/sample_hooks/post-proxy-reboot.sample +3 -0
  44. data/lib/dash/cli/templates/sample_hooks/pre-app-boot.sample +3 -0
  45. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-app-stop.sample +2 -2
  46. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-build.sample +8 -8
  47. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-connect.sample +8 -8
  48. data/lib/{kamal → dash}/cli/templates/sample_hooks/pre-deploy.sample +9 -9
  49. data/lib/dash/cli/templates/sample_hooks/pre-proxy-deploy.sample +3 -0
  50. data/lib/dash/cli/templates/sample_hooks/pre-proxy-reboot.sample +3 -0
  51. data/lib/{kamal → dash}/cli/templates/secrets +6 -6
  52. data/lib/{kamal → dash}/cli.rb +2 -2
  53. data/lib/{kamal → dash}/commander/specifics.rb +2 -2
  54. data/lib/{kamal → dash}/commander.rb +32 -24
  55. data/lib/{kamal → dash}/commands/accessory/proxy.rb +2 -2
  56. data/lib/{kamal → dash}/commands/accessory.rb +2 -2
  57. data/lib/{kamal → dash}/commands/app/assets.rb +1 -1
  58. data/lib/{kamal → dash}/commands/app/containers.rb +1 -1
  59. data/lib/{kamal → dash}/commands/app/error_pages.rb +2 -2
  60. data/lib/{kamal → dash}/commands/app/execution.rb +2 -2
  61. data/lib/{kamal → dash}/commands/app/images.rb +1 -1
  62. data/lib/{kamal → dash}/commands/app/logging.rb +1 -1
  63. data/lib/{kamal → dash}/commands/app/proxy.rb +2 -2
  64. data/lib/{kamal → dash}/commands/app.rb +2 -2
  65. data/lib/{kamal → dash}/commands/auditor.rb +3 -7
  66. data/lib/{kamal → dash}/commands/base.rb +39 -3
  67. data/lib/{kamal → dash}/commands/builder/base.rb +2 -2
  68. data/lib/{kamal → dash}/commands/builder/clone.rb +3 -3
  69. data/lib/{kamal → dash}/commands/builder/cloud.rb +1 -1
  70. data/lib/{kamal → dash}/commands/builder/hybrid.rb +1 -1
  71. data/lib/{kamal → dash}/commands/builder/local.rb +1 -1
  72. data/lib/{kamal → dash}/commands/builder/pack.rb +1 -1
  73. data/lib/{kamal → dash}/commands/builder/remote.rb +1 -1
  74. data/lib/{kamal → dash}/commands/builder.rb +7 -7
  75. data/lib/dash/commands/docker.rb +89 -0
  76. data/lib/{kamal → dash}/commands/hook.rb +1 -1
  77. data/lib/{kamal → dash}/commands/loadbalancer.rb +55 -24
  78. data/lib/{kamal → dash}/commands/lock.rb +3 -3
  79. data/lib/{kamal → dash}/commands/proxy/cert_transfer.rb +6 -6
  80. data/lib/dash/commands/proxy.rb +375 -0
  81. data/lib/{kamal → dash}/commands/prune.rb +2 -2
  82. data/lib/dash/commands/registry.rb +44 -0
  83. data/lib/{kamal → dash}/commands/server.rb +1 -5
  84. data/lib/dash/commands.rb +2 -0
  85. data/lib/{kamal → dash}/configuration/accessory.rb +13 -13
  86. data/lib/{kamal → dash}/configuration/alias.rb +3 -3
  87. data/lib/{kamal → dash}/configuration/boot.rb +2 -2
  88. data/lib/{kamal → dash}/configuration/builder.rb +7 -7
  89. data/lib/{kamal → dash}/configuration/docs/accessory.yml +3 -3
  90. data/lib/{kamal → dash}/configuration/docs/builder.yml +3 -3
  91. data/lib/{kamal → dash}/configuration/docs/configuration.yml +13 -6
  92. data/lib/{kamal → dash}/configuration/docs/env.yml +10 -10
  93. data/lib/{kamal → dash}/configuration/docs/proxy.yml +68 -45
  94. data/lib/{kamal → dash}/configuration/docs/registry.yml +5 -5
  95. data/lib/{kamal → dash}/configuration/env/tag.rb +2 -2
  96. data/lib/{kamal → dash}/configuration/env.rb +5 -5
  97. data/lib/{kamal → dash}/configuration/loadbalancer.rb +5 -5
  98. data/lib/{kamal → dash}/configuration/logging.rb +3 -3
  99. data/lib/{kamal → dash}/configuration/output.rb +4 -4
  100. data/lib/{kamal → dash}/configuration/proxy/acme.rb +9 -8
  101. data/lib/{kamal → dash}/configuration/proxy/boot.rb +9 -11
  102. data/lib/{kamal → dash}/configuration/proxy/run.rb +20 -20
  103. data/lib/{kamal → dash}/configuration/proxy.rb +51 -29
  104. data/lib/{kamal → dash}/configuration/registry.rb +3 -3
  105. data/lib/{kamal → dash}/configuration/role/healthcheck.rb +3 -3
  106. data/lib/{kamal → dash}/configuration/role.rb +14 -14
  107. data/lib/{kamal → dash}/configuration/servers.rb +4 -4
  108. data/lib/{kamal → dash}/configuration/ssh.rb +2 -2
  109. data/lib/{kamal → dash}/configuration/sshkit.rb +2 -2
  110. data/lib/{kamal → dash}/configuration/validation.rb +2 -2
  111. data/lib/{kamal → dash}/configuration/validator/accessory.rb +1 -1
  112. data/lib/{kamal → dash}/configuration/validator/alias.rb +2 -2
  113. data/lib/{kamal → dash}/configuration/validator/builder.rb +1 -1
  114. data/lib/dash/configuration/validator/configuration.rb +6 -0
  115. data/lib/{kamal → dash}/configuration/validator/env.rb +2 -2
  116. data/lib/{kamal → dash}/configuration/validator/proxy.rb +31 -31
  117. data/lib/{kamal → dash}/configuration/validator/registry.rb +1 -1
  118. data/lib/{kamal → dash}/configuration/validator/role.rb +1 -1
  119. data/lib/{kamal → dash}/configuration/validator/servers.rb +1 -1
  120. data/lib/{kamal → dash}/configuration/validator.rb +4 -4
  121. data/lib/{kamal → dash}/configuration/volume.rb +2 -2
  122. data/lib/{kamal → dash}/configuration.rb +47 -37
  123. data/lib/{kamal → dash}/docker.rb +1 -1
  124. data/lib/{kamal → dash}/env_file.rb +1 -1
  125. data/lib/{kamal → dash}/git.rb +1 -1
  126. data/lib/{kamal → dash}/otel_shipper.rb +3 -3
  127. data/lib/{kamal → dash}/output/base_logger.rb +1 -1
  128. data/lib/{kamal → dash}/output/file_logger.rb +1 -1
  129. data/lib/{kamal → dash}/output/formatter.rb +1 -1
  130. data/lib/{kamal → dash}/output/otel_logger.rb +3 -3
  131. data/lib/dash/project_directory.rb +28 -0
  132. data/lib/{kamal → dash}/secrets/adapters/aws_secrets_manager.rb +1 -1
  133. data/lib/{kamal → dash}/secrets/adapters/base.rb +2 -2
  134. data/lib/{kamal → dash}/secrets/adapters/bitwarden.rb +1 -1
  135. data/lib/{kamal → dash}/secrets/adapters/bitwarden_secrets_manager.rb +1 -1
  136. data/lib/{kamal → dash}/secrets/adapters/doppler.rb +1 -1
  137. data/lib/{kamal → dash}/secrets/adapters/enpass.rb +1 -1
  138. data/lib/{kamal → dash}/secrets/adapters/gcp_secret_manager.rb +1 -1
  139. data/lib/{kamal → dash}/secrets/adapters/last_pass.rb +1 -1
  140. data/lib/{kamal → dash}/secrets/adapters/one_password.rb +2 -2
  141. data/lib/{kamal → dash}/secrets/adapters/passbolt.rb +1 -1
  142. data/lib/{kamal → dash}/secrets/adapters/test.rb +1 -1
  143. data/lib/{kamal → dash}/secrets/adapters.rb +2 -2
  144. data/lib/{kamal → dash}/secrets/dotenv/inline_command_substitution.rb +2 -2
  145. data/lib/{kamal → dash}/secrets.rb +6 -6
  146. data/lib/{kamal → dash}/tags.rb +8 -3
  147. data/lib/{kamal → dash}/utils/sensitive.rb +1 -1
  148. data/lib/{kamal → dash}/utils.rb +16 -6
  149. data/lib/dash/version.rb +3 -0
  150. data/lib/{kamal.rb → dash.rb} +4 -4
  151. metadata +157 -154
  152. data/lib/kamal/cli/alias/command.rb +0 -10
  153. data/lib/kamal/cli/build/clone.rb +0 -59
  154. data/lib/kamal/cli/healthcheck/error.rb +0 -2
  155. data/lib/kamal/cli/templates/sample_hooks/docker-setup.sample +0 -3
  156. data/lib/kamal/cli/templates/sample_hooks/post-app-boot.sample +0 -3
  157. data/lib/kamal/cli/templates/sample_hooks/post-app-stop.sample +0 -9
  158. data/lib/kamal/cli/templates/sample_hooks/post-deploy.sample +0 -14
  159. data/lib/kamal/cli/templates/sample_hooks/post-proxy-deploy.sample +0 -3
  160. data/lib/kamal/cli/templates/sample_hooks/post-proxy-reboot.sample +0 -3
  161. data/lib/kamal/cli/templates/sample_hooks/pre-app-boot.sample +0 -3
  162. data/lib/kamal/cli/templates/sample_hooks/pre-proxy-deploy.sample +0 -3
  163. data/lib/kamal/cli/templates/sample_hooks/pre-proxy-reboot.sample +0 -3
  164. data/lib/kamal/commands/docker.rb +0 -55
  165. data/lib/kamal/commands/proxy.rb +0 -266
  166. data/lib/kamal/commands/registry.rb +0 -38
  167. data/lib/kamal/commands.rb +0 -2
  168. data/lib/kamal/configuration/validator/configuration.rb +0 -6
  169. data/lib/kamal/version.rb +0 -3
  170. /data/lib/{kamal → dash}/configuration/docs/alias.yml +0 -0
  171. /data/lib/{kamal → dash}/configuration/docs/boot.yml +0 -0
  172. /data/lib/{kamal → dash}/configuration/docs/logging.yml +0 -0
  173. /data/lib/{kamal → dash}/configuration/docs/output.yml +0 -0
  174. /data/lib/{kamal → dash}/configuration/docs/role.yml +0 -0
  175. /data/lib/{kamal → dash}/configuration/docs/servers.yml +0 -0
  176. /data/lib/{kamal → dash}/configuration/docs/ssh.yml +0 -0
  177. /data/lib/{kamal → dash}/configuration/docs/sshkit.yml +0 -0
  178. /data/lib/{kamal → dash}/sshkit_with_ext.rb +0 -0
@@ -1,266 +0,0 @@
1
- class Kamal::Commands::Proxy < Kamal::Commands::Base
2
- include Kamal::Commands::Proxy::CertTransfer
3
-
4
- delegate :argumentize, :optionize, to: Kamal::Utils
5
- attr_reader :proxy_run_config
6
-
7
- CONFIG_DIGEST_LABEL = "org.kamal.proxy-config-digest"
8
-
9
- def initialize(config, host:)
10
- super(config)
11
- @proxy_run_config = config.proxy_run(host)
12
- end
13
-
14
- def run(digest: nil, name: nil)
15
- if proxy_run_config
16
- docker \
17
- :run,
18
- "--name", name || container_name,
19
- *proxy_run_config.network_args,
20
- "--detach",
21
- "--restart", "unless-stopped",
22
- "--volume", "kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy",
23
- *config_digest_label_args(digest),
24
- *proxy_run_config.docker_options_args,
25
- *proxy_run_config.image,
26
- *proxy_run_config.run_command
27
- else
28
- pipe boot_config, xargs(docker_run(digest: digest))
29
- end
30
- end
31
-
32
- def start
33
- docker :container, :start, container_name
34
- end
35
-
36
- def stop(name: container_name, timeout: nil)
37
- docker :container, :stop, *("--time #{timeout}" if timeout), name
38
- end
39
-
40
- def start_or_run(digest: nil)
41
- combine start, run(digest: digest), by: "||"
42
- end
43
-
44
- def info
45
- docker :ps, "--filter", "'name=^#{container_name}$'"
46
- end
47
-
48
- def version
49
- pipe \
50
- docker(:inspect, container_name, "--format '{{.Config.Image}}'"),
51
- [ :awk, "-F:", "'{print \$NF}'" ]
52
- end
53
-
54
- def config_digest
55
- docker :inspect, container_name, "--format", "'{{ index .Config.Labels \"#{CONFIG_DIGEST_LABEL}\" }}'"
56
- end
57
-
58
- def container_id(only_running: false)
59
- container_id_for(container_name: container_name, only_running: only_running)
60
- end
61
-
62
- def pull
63
- if proxy_run_config
64
- docker :pull, proxy_run_config.image
65
- else
66
- docker :pull, "#{substitute(read_image)}:#{substitute(read_image_version)}"
67
- end
68
- end
69
-
70
- def list(name: container_name, json: false)
71
- docker :exec, name, "kamal-proxy", :list, *("--json" if json)
72
- end
73
-
74
- def cache_stats(count: false, json: false)
75
- docker :exec, container_name, "kamal-proxy", :cache, :stats, *optionize({ count: count || nil, json: json || nil }.compact)
76
- end
77
-
78
- def cache_purge(service, path_prefix: nil)
79
- docker :exec, container_name, "kamal-proxy", :cache, :purge, service, *optionize({ "path-prefix": path_prefix }.compact)
80
- end
81
-
82
- # One mount destination per line - what the running container was actually
83
- # booted with, as opposed to what the current configuration would mount.
84
- def mount_destinations
85
- docker :inspect, container_name, "--format", "'{{range .Mounts}}{{println .Destination}}{{end}}'"
86
- end
87
-
88
- # Zero-downtime handoff commands (proxy/run port_holder mode)
89
-
90
- def port_holder?
91
- proxy_run_config&.port_holder? || false
92
- end
93
-
94
- def next_container_name
95
- "#{container_name}-next"
96
- end
97
-
98
- def run_holder
99
- docker \
100
- :run,
101
- "--name", proxy_run_config.holder_container_name,
102
- "--network", "kamal",
103
- "--detach",
104
- "--restart", "unless-stopped",
105
- *proxy_run_config.holder_docker_args,
106
- *proxy_run_config.image,
107
- "kamal-proxy", "hold"
108
- end
109
-
110
- def start_holder_or_run
111
- combine docker(:container, :start, proxy_run_config.holder_container_name), run_holder, by: "||"
112
- end
113
-
114
- def holder_container_id
115
- container_id_for(container_name: proxy_run_config.holder_container_name, only_running: true)
116
- end
117
-
118
- # Cancel the restart policy before draining: drain makes the proxy exit on
119
- # its own, which - unlike `docker stop` - an active restart policy would undo.
120
- def disable_restart
121
- docker :update, "--restart=no", container_name
122
- end
123
-
124
- def drain(timeout: nil)
125
- docker :exec, container_name, "kamal-proxy", :drain, *("--drain-timeout=#{timeout}s" if timeout)
126
- end
127
-
128
- def wait_for_exit(name: container_name)
129
- docker :wait, name
130
- end
131
-
132
- def remove_stopped_container(name: container_name)
133
- docker :container, :rm, name
134
- end
135
-
136
- def promote_next_container
137
- docker :container, :rename, next_container_name, container_name
138
- end
139
-
140
- def logs(timestamps: true, since: nil, lines: nil, grep: nil, grep_options: nil)
141
- pipe \
142
- docker(:logs, container_name, ("--since #{since}" if since), ("--tail #{lines}" if lines), ("--timestamps" if timestamps), "2>&1"),
143
- ("grep '#{grep}'#{" #{grep_options}" if grep_options}" if grep)
144
- end
145
-
146
- def follow_logs(host:, timestamps: true, grep: nil, grep_options: nil)
147
- run_over_ssh pipe(
148
- docker(:logs, container_name, ("--timestamps" if timestamps), "--tail", "10", "--follow", "2>&1"),
149
- (%(grep "#{grep}"#{" #{grep_options}" if grep_options}) if grep)
150
- ).join(" "), host: host
151
- end
152
-
153
- def domains(subcommand)
154
- docker :exec, container_name, "kamal-proxy", "domains", subcommand
155
- end
156
-
157
- def remove_container
158
- docker :container, :prune, "--force", "--filter", "label=org.opencontainers.image.title=kamal-proxy"
159
- end
160
-
161
- def remove_image
162
- docker :image, :prune, "--all", "--force", "--filter", "label=org.opencontainers.image.title=kamal-proxy"
163
- end
164
-
165
- def cleanup_traefik
166
- chain \
167
- docker(:container, :stop, "traefik"),
168
- combine(
169
- docker(:container, :prune, "--force", "--filter", "label=org.opencontainers.image.title=Traefik"),
170
- docker(:image, :prune, "--all", "--force", "--filter", "label=org.opencontainers.image.title=Traefik")
171
- )
172
- end
173
-
174
- def ensure_proxy_directory
175
- make_directory config.proxy_boot.host_directory
176
- end
177
-
178
- def remove_proxy_directory
179
- remove_directory config.proxy_boot.host_directory
180
- end
181
-
182
- def ensure_apps_config_directory
183
- make_directory config.proxy_boot.apps_directory
184
- end
185
-
186
- # Static path rather than proxy_run_config.secrets_path: the file must be
187
- # removable precisely when the run config (or its secrets) is gone.
188
- def remove_proxy_secrets_file
189
- remove_file File.join(config.proxy_boot.host_directory, Kamal::Configuration::Proxy::Run::SECRETS_FILENAME)
190
- end
191
-
192
- def boot_config
193
- [ :echo, "#{substitute(read_boot_options)} #{substitute(read_image)}:#{substitute(read_image_version)} #{substitute(read_run_command)}" ]
194
- end
195
-
196
- def read_boot_options
197
- read_file(config.proxy_boot.options_file, default: config.proxy_boot.default_boot_options.join(" "))
198
- end
199
-
200
- def read_image
201
- read_file(config.proxy_boot.image_file, default: config.proxy_boot.image_default)
202
- end
203
-
204
- def read_image_version
205
- read_file(config.proxy_boot.image_version_file, default: Kamal::Configuration::Proxy::Run::MINIMUM_VERSION)
206
- end
207
-
208
- def read_run_command
209
- read_file(config.proxy_boot.run_command_file)
210
- end
211
-
212
- def reset_boot_options
213
- remove_file config.proxy_boot.options_file
214
- end
215
-
216
- def reset_image
217
- remove_file config.proxy_boot.image_file
218
- end
219
-
220
- def reset_image_version
221
- remove_file config.proxy_boot.image_version_file
222
- end
223
-
224
- def reset_run_command
225
- remove_file config.proxy_boot.run_command_file
226
- end
227
-
228
- def loadbalancer
229
- @loadbalancer ||= Kamal::Commands::Loadbalancer.new(config, loadbalancer_config: KAMAL.loadbalancer_config)
230
- end
231
-
232
- private
233
- def container_name
234
- config.proxy_boot.container_name
235
- end
236
-
237
- def cert_store_volume_args
238
- [ "--volume", "kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy" ]
239
- end
240
-
241
- # Same fallback as #pull: without a run config the image comes from the
242
- # legacy boot config files on the host.
243
- def one_off_image
244
- if proxy_run_config
245
- [ proxy_run_config.image ]
246
- else
247
- [ "#{substitute(read_image)}:#{substitute(read_image_version)}" ]
248
- end
249
- end
250
-
251
- def config_digest_label_args(digest)
252
- [ "--label", "#{CONFIG_DIGEST_LABEL}=#{digest}" ] if digest
253
- end
254
-
255
- def docker_run(digest: nil)
256
- docker \
257
- :run,
258
- "--name", container_name,
259
- "--network", "kamal",
260
- "--detach",
261
- "--restart", "unless-stopped",
262
- "--volume", "kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy",
263
- *config_digest_label_args(digest),
264
- *config.proxy_boot.apps_volume.docker_args
265
- end
266
- end
@@ -1,38 +0,0 @@
1
- class Kamal::Commands::Registry < Kamal::Commands::Base
2
- def login(registry_config: nil)
3
- registry_config ||= config.registry
4
-
5
- return if registry_config.local?
6
-
7
- docker :login,
8
- registry_config.server,
9
- "-u", sensitive(Kamal::Utils.escape_shell_value(registry_config.username)),
10
- "-p", sensitive(Kamal::Utils.escape_shell_value(registry_config.password))
11
- end
12
-
13
- def logout(registry_config: nil)
14
- registry_config ||= config.registry
15
-
16
- docker :logout, registry_config.server
17
- end
18
-
19
- def setup(registry_config: nil)
20
- registry_config ||= config.registry
21
-
22
- combine \
23
- docker(:start, "kamal-docker-registry"),
24
- docker(:run, "--detach", "-p", "127.0.0.1:#{registry_config.local_port}:5000", "--name", "kamal-docker-registry", "registry:3"),
25
- by: "||"
26
- end
27
-
28
- def remove
29
- combine \
30
- docker(:stop, "kamal-docker-registry"),
31
- docker(:rm, "kamal-docker-registry"),
32
- by: "&&"
33
- end
34
-
35
- def local?
36
- config.registry.local?
37
- end
38
- end
@@ -1,2 +0,0 @@
1
- module Kamal::Commands
2
- end
@@ -1,6 +0,0 @@
1
- class Kamal::Configuration::Validator::Configuration < Kamal::Configuration::Validator
2
- private
3
- def allow_extensions?
4
- true
5
- end
6
- end
data/lib/kamal/version.rb DELETED
@@ -1,3 +0,0 @@
1
- module Kamal
2
- VERSION = "3.2.0"
3
- end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes