From 2a54521b704db0a19a5c58bfeca961cee7af739c Mon Sep 17 00:00:00 2001 From: Guillaume Meyer <1385518+guillaumemeyer@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:53:35 -0700 Subject: [PATCH] Update installation.md The original alias only works for bash as env vars interpolation works differently in zsh. For zsh, use global single quotes instead of double-quotes. --- _docs/installation.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/_docs/installation.md b/_docs/installation.md index cfdca62..24c12cc 100644 --- a/_docs/installation.md +++ b/_docs/installation.md @@ -11,12 +11,18 @@ If you have a Ruby environment available, you can install Kamal globally with: gem install kamal ``` -...otherwise, you can run a dockerized version via an alias (add this to your .bashrc or similar to simplify re-use): +...otherwise, you can run a dockerized version via an alias to simplify re-use: +For `bash`, add this to your `.bashrc`: ```sh alias kamal="docker run -it --rm -v '${PWD}:/workdir' -v '${SSH_AUTH_SOCK}:/ssh-agent' -v /var/run/docker.sock:/var/run/docker.sock -e 'SSH_AUTH_SOCK=/ssh-agent' ghcr.io/basecamp/kamal:latest" ``` +For `zsh`, add this to your `.zshrc`: +```sh +alias kamal='docker run -it --rm -v ${PWD}:/workdir -v ${SSH_AUTH_SOCK}:/ssh-agent -v /var/run/docker.sock:/var/run/docker.sock -e SSH_AUTH_SOCK=/ssh-agent ghcr.io/basecamp/kamal:latest' +``` + Then, inside your app directory, run `kamal init` (or `kamal init --bundle` within Rails 7+ apps where you want a bin/kamal binstub). Now edit the new file `config/deploy.yml`. It could look as simple as this: ```yaml @@ -74,4 +80,4 @@ After this Kamal can be used for deployment: ```sh BUNDLE_GEMFILE=gemfiles/kamal.gemfile bundle exec kamal deploy -``` \ No newline at end of file +```