Improve the documentation and key order in deploy.yml #1532
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.
The big advantage of Kamal is its dramatic reductions in server preparation and dependency hell through its use of containers, while avoiding the expense of cloud deployment. It is however a steep learning curve for someone coming from uncontainerised deployment. I've had over a week of struggle to get my first Kamal deploy working. This PR is an attempt to make it easier for those who follow to get up to speed by dramatically increasing the documentation in the Kamal
deploy.yml
file (which eventually gets worked up to a Rails template), and to change its key order to a more logical and less error-prone sequence.I've also adjusted the spacing before commented-out keys to make it less likely that uncommenting them puts them at the wrong YAML level, which allows one space to cause severe problems.
Because when deploying my app I used the
deploy.yml
template generated by Rails 8.0.1, the suggestedimage
value wasmy-image
, which confused me because, in every case I've seen, this is of the forma/b
. I see that this example has already been changed tomy-user/my-app
, which I haven't touched but have better documented. But it's stillmy-image
on the website docs.Although I've learned much over the past week, I'm no Kamal expert, so this PR needs to be reviewed for anything false or unclear. But I'm unapologetic about the amount of comments I've added. Every word would have helped speed my understanding and deployment. It's common for experts to regard as obvious things that naive users need to know.
I know there are many more comments in the configuration docs in the source, but
deploy.yml
should be all that most users should see and need, plus I've better documented all the basic settings.A call-out to this blog post for bootstrapping my understanding.
I want to help Kamal reach its potential for extremely rapid, flexible, and cost-effective deployments.