Add a writable proxy volume
Maps in and external /home/kamal-proxy/.app-config volume that we can use to map files to the proxy. Can be used to store custom maintenance pages or SSL certificates.
This commit is contained in:
@@ -109,6 +109,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
|
||||
"--network", "kamal",
|
||||
"--detach",
|
||||
"--restart", "unless-stopped",
|
||||
"--volume", "kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy"
|
||||
"--volume", "kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy",
|
||||
*config.proxy_app_config_volume.docker_args
|
||||
end
|
||||
end
|
||||
|
||||
@@ -300,6 +300,16 @@ class Kamal::Configuration
|
||||
File.join proxy_directory, "image_version"
|
||||
end
|
||||
|
||||
def proxy_app_config_directory
|
||||
File.join proxy_directory, "app-config"
|
||||
end
|
||||
|
||||
def proxy_app_config_volume
|
||||
Volume.new \
|
||||
host_path: proxy_app_config_directory,
|
||||
container_path: "/home/kamal-proxy/.app-config"
|
||||
end
|
||||
|
||||
def to_h
|
||||
{
|
||||
roles: role_names,
|
||||
|
||||
Reference in New Issue
Block a user