Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation docs update proposal #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions _docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -74,4 +80,4 @@ After this Kamal can be used for deployment:

```sh
BUNDLE_GEMFILE=gemfiles/kamal.gemfile bundle exec kamal deploy
```
```