Set proxy run configuration in deploy YAML #1663
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With Kamal 2.0 the plan was to have kamal proxy as a zero config proxy, so that you could run multiple apps through a single proxy instance without configuration conflicts - as such a lot of configuration is done at deploy time, rather than boot time.
But there's actually quite a lot of configuration that's needed at boot time - anything that needs to be set where the container is started - ports, logging options, image version, custom docker options etc.
This can all be currently set with
kamal proxy boot_config set ...but that is cumbersome and the config is stored on the servers which is not ideal. In practice you end up needing to set the config in a hook for consistency so it's in the app repo anyway.So let's allow the config to be set in the deploy YAML at
proxy/runinstead. We'll keep thekamal proxy boot_configcommands and use them if no run config is set, but we'll print a deprecation warning.If you have conflicting proxy configs for a single host in an app, we'll raise a configuration error. If you have them across multiple apps, we'll just use them both and the container will use whichever config it was last booted with.
In the next major version we'll remove the boot_config commands and just use the run config.