Compare commits

..

1 Commits

Author SHA1 Message Date
Donal McBreen
acd4b85044 Kamal-proxy minimum version of v0.5.0
Changes: https://github.com/basecamp/kamal-proxy/compare/v0.4.0...v0.5.0

Also explain how to update the proxy.
2024-09-23 11:42:55 +01:00
6 changed files with 38 additions and 49 deletions

View File

@@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
kamal (2.0.0.rc3) kamal (2.0.0.rc2)
activesupport (>= 7.0) activesupport (>= 7.0)
base64 (~> 0.2) base64 (~> 0.2)
bcrypt_pbkdf (~> 1.0) bcrypt_pbkdf (~> 1.0)

View File

@@ -14,7 +14,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
version = capture_with_info(*KAMAL.proxy.version).strip.presence version = capture_with_info(*KAMAL.proxy.version).strip.presence
if version && Kamal::Utils.older_version?(version, Kamal::Configuration::PROXY_MINIMUM_VERSION) if version && Kamal::Utils.older_version?(version, Kamal::Configuration::PROXY_MINIMUM_VERSION)
raise "kamal-proxy version #{version} is too old, please reboot to update to at least #{Kamal::Configuration::PROXY_MINIMUM_VERSION}" raise "kamal-proxy version #{version} is too old, please run `kamal proxy reboot` to update to at least #{Kamal::Configuration::PROXY_MINIMUM_VERSION}"
end end
execute *KAMAL.proxy.start_or_run execute *KAMAL.proxy.start_or_run
end end

View File

@@ -2,22 +2,11 @@
service: my-app service: my-app
# Name of the container image. # Name of the container image.
image: my-user/my-app image: user/my-app
# Deploy to these servers. # Deploy to these servers.
servers: servers:
web: - 192.168.0.1
- 192.168.0.1
# job:
# hosts:
# - 192.168.0.1
# cmd: bin/jobs
# Enable SSL auto certification via Let's Encrypt (and allow for multiple apps on one server).
# Set ssl: false if using something like Cloudflare to terminate SSL (but keep host!).
proxy:
ssl: true
host: app.example.com
# Credentials for your image host. # Credentials for your image host.
registry: registry:
@@ -25,7 +14,7 @@ registry:
# server: registry.digitalocean.com / ghcr.io / ... # server: registry.digitalocean.com / ghcr.io / ...
username: my-user username: my-user
# Always use an access token rather than real password (pulled from .kamal/secrets). # Always use an access token rather than real password when possible.
password: password:
- KAMAL_REGISTRY_PASSWORD - KAMAL_REGISTRY_PASSWORD
@@ -33,44 +22,19 @@ registry:
builder: builder:
arch: amd64 arch: amd64
# Inject ENV variables into containers (secrets come from .kamal/secrets). # Inject ENV variables into containers (secrets come from .env).
# # Remember to run `kamal env push` after making changes!
# env: # env:
# clear: # clear:
# DB_HOST: 192.168.0.2 # DB_HOST: 192.168.0.2
# secret: # secret:
# - RAILS_MASTER_KEY # - RAILS_MASTER_KEY
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
#
# aliases:
# shell: app exec --interactive --reuse "bash"
# Use a different ssh user than root # Use a different ssh user than root
#
# ssh: # ssh:
# user: app # user: app
# Use a persistent storage volume. # Use accessory services (secrets come from .env).
#
# volumes:
# - "app_storage:/app/storage"
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
# hitting 404 on in-flight requests. Combines all files from new and old
# version inside the asset_path.
#
# asset_path: /app/public/assets
# Configure rolling deploys by setting a wait time between batches of restarts.
#
# boot:
# limit: 10 # Can also specify as a percentage of total hosts, such as "25%"
# wait: 2
# Use accessory services (secrets come from .kamal/secrets).
#
# accessories: # accessories:
# db: # db:
# image: mysql:8.0 # image: mysql:8.0
@@ -92,3 +56,29 @@ builder:
# port: 6379 # port: 6379
# directories: # directories:
# - data:/data # - data:/data
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
# hitting 404 on in-flight requests. Combines all files from new and old
# version inside the asset_path.
#
# If your app is using the Sprockets gem, ensure it sets `config.assets.manifest`.
# See https://github.com/basecamp/kamal/issues/626 for details
#
# asset_path: /rails/public/assets
# Configure rolling deploys by setting a wait time between batches of restarts.
# boot:
# limit: 10 # Can also specify as a percentage of total hosts, such as "25%"
# wait: 2
# Configure the role used to determine the primary_host. This host takes
# deploy locks, runs health checks during the deploy, and follow logs, etc.
#
# Caution: there's no support for role renaming yet, so be careful to cleanup
# the previous role on the deployed hosts.
# primary_role: web
# Controls if we abort when see a role with no hosts. Disabling this may be
# useful for more complex deploy configurations.
#
# allow_empty_roles: false

View File

@@ -1,6 +1,5 @@
# Secrets defined here are available for reference under registry/password, env/secret, builder/secrets, # WARNING: Avoid adding secrets directly to this file
# and accessories/*/env/secret in config/deploy.yml. All secrets should be pulled from either # If you must, then add `.kamal/secrets*` to your .gitignore file
# password manager, ENV, or a file. DO NOT ENTER RAW CREDENTIALS HERE! This file needs to be safe for git.
# Option 1: Read secrets from the environment # Option 1: Read secrets from the environment
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD

View File

@@ -14,7 +14,7 @@ class Kamal::Configuration
include Validation include Validation
PROXY_MINIMUM_VERSION = "v0.4.0" PROXY_MINIMUM_VERSION = "v0.5.0"
PROXY_HTTP_PORT = 80 PROXY_HTTP_PORT = 80
PROXY_HTTPS_PORT = 443 PROXY_HTTPS_PORT = 443

View File

@@ -1,3 +1,3 @@
module Kamal module Kamal
VERSION = "2.0.0.rc3" VERSION = "2.0.0.rc2"
end end