Skip to content

Commit

Permalink
Merge branch 'main' into healthcheck-exposed-port
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Sep 18, 2023
2 parents ffad57a + 5a58c10 commit 60823af
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions _data/github.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
tag_name: v0.16.0
published_at: August 22, 2023
tag_name: v0.16.1
published_at: August 24, 2023
15 changes: 10 additions & 5 deletions _docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,11 @@ servers:

## Using shell expansion

You can use shell expansion to interpolate values from the host machine into labels and env variables with the `${}` syntax. Anything within the curly braces will be executed on the host machine and the result will be interpolated into the label or env variable.
You can use shell expansion to interpolate values from the host machine into labels with the `${}` syntax. Anything within the curly braces will be executed on the host machine and the result will be interpolated into the label.

```yaml
labels:
host-machine: "${cat /etc/hostname}"

env:
HOST_DEPLOYMENT_DIR: "${PWD}"
```

**Note:** Any other occurrence of `$` will be escaped to prevent unwanted shell expansion!
Expand Down Expand Up @@ -493,6 +490,12 @@ traefik:
host_port: 8080
```

Alternatively, set `publish` to `false` to prevent binding to a host port. This can be useful if you are running Traefik behind a reverse proxy, for example:
```yaml
traefik:
publish: false
```

## Traefik version, upgrades, and custom images

Kamal runs the traefik:v2.9 image to track Traefik 2.9.x releases.
Expand Down Expand Up @@ -688,7 +691,9 @@ The healthcheck allows for an optional `max_attempts` setting, which will attemp

The HTTP health checks assume that the `curl` command is available inside the container. If that's not the case, use the healthcheck's `cmd` option to specify an alternative check that the container supports.

## Ung a custom port for the healthcheck with multiple apps
When starting container healthcheck by default will only show last 50 lines. That might be not enough when something goes wrong - so you can add `log_lines` params and specify larger number if required.

## Using a custom port for the healthcheck with multiple apps

Healthcheck is binding containers port to server's port. When running multiple applications on the same server and deploying them in parallel you should specify different port for each application.

Expand Down
8 changes: 4 additions & 4 deletions _docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ 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 (add this to your .bashrc or similar to simplify re-use). On macOS, use:

```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"
alias kamal="docker run -it --rm -v '${PWD}:/workdir' -v '/run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock' -e SSH_AUTH_SOCK='/run/host-services/ssh-auth.sock' -v /var/run/docker.sock:/var/run/docker.sock 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:
Expand Down Expand Up @@ -60,7 +60,7 @@ Voila! All the servers are now serving the app on port 80. If you're just runnin

### Rails <7 usage

Kamal is not needed to be in your application Gemfile to be used. However, if you want to guarantee specific Kamal version in your CI/CD workflows, you can create a separate Gemfile for Kamal, for example, `gemfile/kamal.gemfile`:
Kamal is not needed to be in your application Gemfile to be used. However, if you want to guarantee specific Kamal version in your CI/CD workflows, you can create a separate Gemfile for Kamal, for example, `gemfiles/kamal.gemfile`:

```ruby
source 'https://rubygems.org'
Expand All @@ -74,4 +74,4 @@ After this Kamal can be used for deployment:

```sh
BUNDLE_GEMFILE=gemfiles/kamal.gemfile bundle exec kamal deploy
```
```
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="headline">
<header>
<h1>Deploy web apps anywhere.</h1>
<p>From bare metal to cloud VMs using Docker,<br /> deploy web apps anywhere with zero downtime.</p>
<p>From bare metal to cloud VMs,<br /> deploy web apps anywhere with zero downtime.</p>
</header>
</div>

Expand Down

0 comments on commit 60823af

Please sign in to comment.