kamal 2.1.1 → 2.2.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.
- checksums.yaml +4 -4
- data/lib/kamal/cli/accessory.rb +2 -0
- data/lib/kamal/cli/main.rb +1 -1
- data/lib/kamal/cli/proxy.rb +2 -0
- data/lib/kamal/cli/templates/deploy.yml +3 -2
- data/lib/kamal/cli/templates/sample_hooks/docker-setup.sample +2 -12
- data/lib/kamal/configuration/proxy.rb +1 -1
- data/lib/kamal/configuration.rb +7 -2
- data/lib/kamal/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f37e44e951bb159f0af8f19aea46d1cbbf4d6950777c11f545b0eafd0e3dcf0
|
4
|
+
data.tar.gz: 628944b9411d03c7890b715eda2984c2b920fc271b8567432a20fe5b1af709ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7067b13ef2d61dca2e184a6abfc4707a840f954277febd489836e0e684fadef932015032ec23fc94889c33d37094ac5345ddd65e139ab63572c7d9e20090f240
|
7
|
+
data.tar.gz: 3e1a750fc601a401ecd650e3701dbafc7adc5775c97e12131f47f75a5e04f0524a7ce867202f38a70c769086389bda8889de66f18614565d164f4e6c96f71ec3
|
data/lib/kamal/cli/accessory.rb
CHANGED
data/lib/kamal/cli/main.rb
CHANGED
@@ -135,7 +135,7 @@ class Kamal::Cli::Main < Kamal::Cli::Base
|
|
135
135
|
puts "No documentation found for #{section}"
|
136
136
|
end
|
137
137
|
|
138
|
-
desc "init", "Create config stub in config/deploy.yml and
|
138
|
+
desc "init", "Create config stub in config/deploy.yml and secrets stub in .kamal"
|
139
139
|
option :bundle, type: :boolean, default: false, desc: "Add Kamal to the Gemfile and create a bin/kamal binstub"
|
140
140
|
def init
|
141
141
|
require "fileutils"
|
data/lib/kamal/cli/proxy.rb
CHANGED
@@ -25,12 +25,14 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
|
|
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,8 +14,9 @@ servers:
|
|
14
14
|
# cmd: bin/jobs
|
15
15
|
|
16
16
|
# Enable SSL auto certification via Let's Encrypt (and allow for multiple apps on one server).
|
17
|
-
#
|
18
|
-
|
17
|
+
# If using something like Cloudflare, it is recommended to set encryption mode
|
18
|
+
# in Cloudflare's SSL/TLS setting to "Full" to enable end-to-end encryption.
|
19
|
+
proxy:
|
19
20
|
ssl: true
|
20
21
|
host: app.example.com
|
21
22
|
# kamal-proxy connects to your container over port 80, use `app_port` to specify a different port.
|
@@ -1,13 +1,3 @@
|
|
1
|
-
#!/
|
1
|
+
#!/bin/sh
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
# Sets up a Docker network on defined hosts which can then be used by the application’s containers
|
6
|
-
|
7
|
-
hosts = ENV["KAMAL_HOSTS"].split(",")
|
8
|
-
|
9
|
-
hosts.each do |ip|
|
10
|
-
destination = "root@#{ip}"
|
11
|
-
puts "Creating a Docker network \"kamal\" on #{destination}"
|
12
|
-
`ssh #{destination} docker network create kamal`
|
13
|
-
end
|
3
|
+
echo "Docker set up on $KAMAL_HOSTS..."
|
@@ -29,7 +29,7 @@ class Kamal::Configuration::Proxy
|
|
29
29
|
def deploy_options
|
30
30
|
{
|
31
31
|
host: hosts,
|
32
|
-
tls: proxy_config["ssl"],
|
32
|
+
tls: proxy_config["ssl"].presence,
|
33
33
|
"deploy-timeout": seconds_duration(config.deploy_timeout),
|
34
34
|
"drain-timeout": seconds_duration(config.drain_timeout),
|
35
35
|
"health-check-interval": seconds_duration(proxy_config.dig("healthcheck", "interval")),
|
data/lib/kamal/configuration.rb
CHANGED
@@ -14,9 +14,10 @@ class Kamal::Configuration
|
|
14
14
|
|
15
15
|
include Validation
|
16
16
|
|
17
|
-
PROXY_MINIMUM_VERSION = "v0.
|
17
|
+
PROXY_MINIMUM_VERSION = "v0.8.0"
|
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
|
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
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.
|
4
|
+
version: 2.2.0
|
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-
|
11
|
+
date: 2024-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -336,7 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
336
|
- !ruby/object:Gem::Version
|
337
337
|
version: '0'
|
338
338
|
requirements: []
|
339
|
-
rubygems_version: 3.
|
339
|
+
rubygems_version: 3.3.22
|
340
340
|
signing_key:
|
341
341
|
specification_version: 4
|
342
342
|
summary: Deploy web apps in containers to servers running Docker with zero downtime.
|