Use xargs to handle spaces in proxy options

We cat the options file, append the proxy image and then pass it
to xargs to ensure it handles spaces correctly.

Works better than using eval which can handle spaces but tries
to evaluate things like backticks.

Fixes: https://github.com/basecamp/kamal/issues/1448
This commit is contained in:
Donal McBreen
2025-03-17 16:58:15 +00:00
parent a02826284d
commit 7fa27faaca
5 changed files with 41 additions and 20 deletions

View File

@@ -1,3 +1,4 @@
kamal proxy boot_config set --publish false \
--docker_options label=traefik.http.services.kamal_proxy.loadbalancer.server.scheme=http \
label=traefik.http.routers.kamal_proxy.rule=PathPrefix\(\`/\`\)
label=traefik.http.routers.kamal_proxy.rule=PathPrefix\(\`/\`\) \
sysctl=net.ipv4.ip_local_port_range=\"10000\ 60999\"