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

Proxy boot config #974

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Proxy boot config #974

merged 1 commit into from
Sep 25, 2024

Conversation

djmb
Copy link
Collaborator

@djmb djmb commented Sep 25, 2024

Add commands for managing proxy boot config. Since the proxy can be shared by multiple applications, the configuration doesn't belong in config/deploy.yml.

Instead you can set the config with:

Usage:
  kamal proxy boot_config <set|get|clear>

Options:
      [--publish], [--no-publish], [--skip-publish]   # Publish the proxy ports on the host
                                                      # Default: true
      [--http-port=N]                                 # HTTP port to publish on the host
                                                      # Default: 80
      [--https-port=N]                                # HTTPS port to publish on the host
                                                      # Default: 443
      [--docker-options=option=value option2=value2]  # Docker options to pass to the proxy container

By default we boot the proxy with --publish 80:80 --publish 443:443.

You can stop it from publishing ports, specify different ports and pass other docker options.

The config is stored in .kamal/proxy/options as arguments to be passed verbatim to docker run.

Where someone wants to set the options in their application they can do that by calling kamal proxy boot_config set in a pre-deploy hook.

There's an example in the integration tests showing how to use this to front kamal-proxy with Traefik, using an accessory.

Add commands for managing proxy boot config. Since the proxy can be
shared by multiple applications, the configuration doesn't belong in
`config/deploy.yml`.

Instead you can set the config with:

```
Usage:
  kamal proxy boot_config <set|get|clear>

Options:
      [--publish], [--no-publish], [--skip-publish]   # Publish the proxy ports on the host
                                                      # Default: true
      [--http-port=N]                                 # HTTP port to publish on the host
                                                      # Default: 80
      [--https-port=N]                                # HTTPS port to publish on the host
                                                      # Default: 443
      [--docker-options=option=value option2=value2]  # Docker options to pass to the proxy container
```

By default we boot the proxy with `--publish 80:80 --publish 443:443`.

You can stop it from publishing ports, specify different ports and pass
other docker options.

The config is stored in `.kamal/proxy/options` as arguments to be passed
verbatim to docker run.

Where someone wants to set the options in their application they can do
that by calling `kamal proxy boot_config set` in a pre-deploy hook.

There's an example in the integration tests showing how to use this to
front kamal-proxy with Traefik, using an accessory.
@djmb djmb merged commit 7633fe0 into main Sep 25, 2024
9 checks passed
@djmb djmb deleted the proxy-boot-config branch September 25, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant