kamal 2.1.2 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1aaf8b7548e1dfebb3f19739491a5fb53ec715aea28ea3a93060b4b08c7904da
4
- data.tar.gz: f4c669cfff249ab9595a6109ee6d858601345495e689b9c8e020c3e1fe7a477f
3
+ metadata.gz: 69b742751668ecf7877e0afc8e71a111e3faad501fe5ea01ff773793bf599df7
4
+ data.tar.gz: f5e3738aac9cdbc2f9e493613c0c975ef7c7939ba06f9982a1508f5440c02213
5
5
  SHA512:
6
- metadata.gz: 7a3ee617d039db0c058fede9fbe66c0ffcc937c437ec9a85c13d2f5d9c645e475a29eab638d05b938305a197dba96493f9d9349fc736c226ef1457615843f648
7
- data.tar.gz: 7ef1c0c7173d2f8c0b37d0f5efa507c70f8691c9045ccbfce78daec50fc71faf396e2e456a29c86e78f59fe8f1a0ac785a9ff8c27455d86ca04573faf46de08c
6
+ metadata.gz: 6466a0ffb55dacfe8e2f411341ecdd6a71f4f00dc0f995789d8225ab39d0c9cbd9f5b1e88016e5ab06e88cea4bba6fac48d847d8ee84f37cf2f251d021bba1b1
7
+ data.tar.gz: c4efb73c259cd4ae0d5025c6eccecb3aaa622b9ce93d5cf11d0794f3673a36b8decfb61f1092449e2a293562ec3fb1df45eca7e5158179373a48734b99c4a46c
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/array/conversions"
2
+
1
3
  class Kamal::Cli::Accessory < Kamal::Cli::Base
2
4
  desc "boot [NAME]", "Boot new accessory service on host (use NAME=all to boot all accessories)"
3
5
  def boot(name, prepare: true)
@@ -21,16 +21,18 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
21
21
  end
22
22
  end
23
23
 
24
- desc "boot_config <set|get|clear>", "Mange kamal-proxy boot configuration"
24
+ desc "boot_config <set|get|reset>", "Mange kamal-proxy boot configuration"
25
25
  option :publish, type: :boolean, default: true, desc: "Publish the proxy ports on the host"
26
26
  option :http_port, type: :numeric, default: Kamal::Configuration::PROXY_HTTP_PORT, desc: "HTTP port to publish on the host"
27
27
  option :https_port, type: :numeric, default: Kamal::Configuration::PROXY_HTTPS_PORT, desc: "HTTPS port to publish on the host"
28
+ option :log_max_size, type: :string, default: Kamal::Configuration::PROXY_LOG_MAX_SIZE, desc: "Max size of proxy logs"
28
29
  option :docker_options, type: :array, default: [], desc: "Docker options to pass to the proxy container", banner: "option=value option2=value2"
29
30
  def boot_config(subcommand)
30
31
  case subcommand
31
32
  when "set"
32
33
  boot_options = [
33
34
  *(KAMAL.config.proxy_publish_args(options[:http_port], options[:https_port]) if options[:publish]),
35
+ *(KAMAL.config.proxy_logging_args(options[:log_max_size])),
34
36
  *options[:docker_options].map { |option| "--#{option}" }
35
37
  ]
36
38
 
@@ -14,9 +14,10 @@ class Kamal::Configuration
14
14
 
15
15
  include Validation
16
16
 
17
- PROXY_MINIMUM_VERSION = "v0.7.0"
17
+ PROXY_MINIMUM_VERSION = "v0.8.1"
18
18
  PROXY_HTTP_PORT = 80
19
19
  PROXY_HTTPS_PORT = 443
20
+ PROXY_LOG_MAX_SIZE = "10m"
20
21
 
21
22
  class << self
22
23
  def create_from(config_file:, destination: nil, version: nil)
@@ -252,8 +253,12 @@ class Kamal::Configuration
252
253
  argumentize "--publish", [ "#{http_port}:#{PROXY_HTTP_PORT}", "#{https_port}:#{PROXY_HTTPS_PORT}" ]
253
254
  end
254
255
 
256
+ def proxy_logging_args(max_size)
257
+ argumentize "--log-opt", "max-size=#{max_size}"
258
+ end
259
+
255
260
  def proxy_options_default
256
- proxy_publish_args PROXY_HTTP_PORT, PROXY_HTTPS_PORT
261
+ [ *proxy_publish_args(PROXY_HTTP_PORT, PROXY_HTTPS_PORT), *proxy_logging_args(PROXY_LOG_MAX_SIZE) ]
257
262
  end
258
263
 
259
264
  def proxy_image
data/lib/kamal/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kamal
2
- VERSION = "2.1.2"
2
+ VERSION = "2.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-06 00:00:00.000000000 Z
11
+ date: 2024-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport