You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/configuration/accessories.md
+19-8
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,19 @@
1
1
---
2
+
# This file has been generated from the Kamal source, do not edit directly.
3
+
# Find the source of this file at lib/kamal/configuration/docs/accessory.yml in the Kamal repository.
2
4
title: Accessories
3
5
---
4
6
5
7
# Accessories
6
8
7
-
Accessories can be booted on a single host, a list of hosts, or on specific roles. The hosts do not need to be defined in the Kamal servers configuration.
9
+
Accessories can be booted on a single host, a list of hosts, or on specific roles.
10
+
The hosts do not need to be defined in the Kamal servers configuration.
8
11
9
-
Accessories are managed separately from the main service — they are not updated when you deploy, and they do not have zero-downtime deployments.
12
+
Accessories are managed separately from the main service — they are not updated
13
+
when you deploy, and they do not have zero-downtime deployments.
10
14
11
-
Run `kamal accessory boot <accessory>` to boot an accessory. See `kamal accessory --help` for more information.
15
+
Run `kamal accessory boot <accessory>` to boot an accessory.
16
+
See `kamal accessory --help` for more information.
This is used in the service label and defaults to `<service>-<accessory>`, where `<service>` is the main service name from the root configuration:
29
+
This is used in the service label and defaults to `<service>-<accessory>`,
30
+
where `<service>` is the main service name from the root configuration:
25
31
26
32
```yaml
27
33
service: mysql
@@ -58,7 +64,8 @@ You can set a custom command to run in the container if you do not want to use t
58
64
59
65
## [Port mappings](#port-mappings)
60
66
61
-
See https://docs.docker.com/network/, and especially note the warning about the security implications of exposing ports publicly.
67
+
See https://docs.docker.com/network/, and especially note the warning about the security
68
+
implications of exposing ports publicly.
62
69
63
70
```yaml
64
71
port: "127.0.0.1:3306:3306"
@@ -92,7 +99,9 @@ See [Environment variables](../environment-variables) for more information:
92
99
93
100
## [Copying files](#copying-files)
94
101
95
-
You can specify files to mount into the container. The format is `local:remote`, where `local` is the path to the file on the local machine and `remote` is the path to the file in the container.
102
+
You can specify files to mount into the container.
103
+
The format is `local:remote`, where `local` is the path to the file on the local machine
104
+
and `remote` is the path to the file in the container.
96
105
97
106
They will be uploaded from the local repo to the host and then mounted.
98
107
@@ -106,7 +115,8 @@ ERB files will be evaluated before being copied.
106
115
107
116
## [Directories](#directories)
108
117
109
-
You can specify directories to mount into the container. They will be created on the host before being mounted:
118
+
You can specify directories to mount into the container. They will be created on the host
119
+
before being mounted:
110
120
111
121
```yaml
112
122
directories:
@@ -115,7 +125,8 @@ You can specify directories to mount into the container. They will be created on
115
125
116
126
## [Volumes](#volumes)
117
127
118
-
Any other volumes to mount, in addition to the files and directories. They are not created or copied before mounting:
128
+
Any other volumes to mount, in addition to the files and directories.
Copy file name to clipboardexpand all lines: docs/configuration/builders.md
+9-4
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
1
---
2
+
# This file has been generated from the Kamal source, do not edit directly.
3
+
# Find the source of this file at lib/kamal/configuration/docs/builder.yml in the Kamal repository.
2
4
title: Builder
3
5
---
4
6
@@ -29,15 +31,17 @@ Allowed values are `amd64` and `arm64`:
29
31
30
32
## [Remote](#remote)
31
33
32
-
The connection string for a remote builder. If supplied, Kamal will use this for builds that do not match the local architecture of the deployment host.
34
+
The connection string for a remote builder. If supplied, Kamal will use this
35
+
for builds that do not match the local architecture of the deployment host.
33
36
34
37
```yaml
35
38
remote: ssh://docker@docker-builder
36
39
```
37
40
38
41
## [Local](#local)
39
42
40
-
If set to false, Kamal will always use the remote builder even when building the local architecture.
43
+
If set to false, Kamal will always use the remote builder even when building
44
+
the local architecture.
41
45
42
46
Defaults to true:
43
47
@@ -60,7 +64,8 @@ The image is only used for registry cache and is not compatible with the Docker
60
64
61
65
## [Build context](#build-context)
62
66
63
-
If this is not set, then a local Git clone of the repo is used. This ensures a clean build with no uncommitted changes.
67
+
If this is not set, then a local Git clone of the repo is used.
68
+
This ensures a clean build with no uncommitted changes.
64
69
65
70
To use the local checkout instead, you can set the context to `.`, or a path to another directory.
66
71
@@ -102,7 +107,7 @@ FROM ruby:$RUBY_VERSION-slim as base
Copy file name to clipboardexpand all lines: docs/configuration/docker-registry.md
+13-5
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,15 @@
1
1
---
2
+
# This file has been generated from the Kamal source, do not edit directly.
3
+
# Find the source of this file at lib/kamal/configuration/docs/registry.yml in the Kamal repository.
2
4
title: Registry
3
5
---
4
6
5
7
# Registry
6
8
7
-
The default registry is Docker Hub, but you can change it using `registry/server`:
9
+
The default registry is Docker Hub, but you can change it using `registry/server`.
8
10
9
-
A reference to a secret (in this case, `DOCKER_REGISTRY_TOKEN`) will look up the secret in the local environment.
11
+
A reference to a secret (in this case, `DOCKER_REGISTRY_TOKEN`) will look up the secret
12
+
in the local environment:
10
13
11
14
```yaml
12
15
registry:
@@ -19,7 +22,8 @@ registry:
19
22
20
23
## [Using AWS ECR as the container registry](#using-aws-ecr-as-the-container-registry)
21
24
22
-
You will need to have the AWS CLI installed locally for this to work. AWS ECR’s access token is only valid for 12 hours. In order to avoid having to manually regenerate the token every time, you can use ERB in the `deploy.yml` file to shell out to the AWS CLI command and obtain the token:
25
+
You will need to have the AWS CLI installed locally for this to work.
26
+
AWS ECR’s access token is only valid for 12 hours. In order to avoid having to manually regenerate the token every time, you can use ERB in the `deploy.yml` file to shell out to the AWS CLI command and obtain the token:
23
27
24
28
```yaml
25
29
registry:
@@ -30,7 +34,10 @@ registry:
30
34
31
35
## [Using GCP Artifact Registry as the container registry](#using-gcp-artifact-registry-as-the-container-registry)
32
36
33
-
To sign into Artifact Registry, you need to [create a service account](https://cloud.google.com/iam/docs/service-accounts-create#creating) and [set up roles and permissions](https://cloud.google.com/artifact-registry/docs/access-control#permissions). Normally, assigning the `roles/artifactregistry.writer` role should be sufficient.
37
+
To sign into Artifact Registry, you need to
38
+
[create a service account](https://cloud.google.com/iam/docs/service-accounts-create#creating)
39
+
and [set up roles and permissions](https://cloud.google.com/artifact-registry/docs/access-control#permissions).
40
+
Normally, assigning the `roles/artifactregistry.writer` role should be sufficient.
34
41
35
42
Once the service account is ready, you need to generate and download a JSON key and base64 encode it:
Copy file name to clipboardexpand all lines: docs/configuration/environment-variables.md
+14-6
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
1
---
2
+
# This file has been generated from the Kamal source, do not edit directly.
3
+
# Find the source of this file at lib/kamal/configuration/docs/env.yml in the Kamal repository.
2
4
title: Environment variables
3
5
---
4
6
5
7
# Environment variables
6
8
7
-
Environment variables can be set directly in the Kamal configuration or read from `.kamal/secrets`.
9
+
Environment variables can be set directly in the Kamal configuration or
10
+
read from `.kamal/secrets`.
8
11
9
12
## [Reading environment variables from the configuration](#reading-environment-variables-from-the-configuration)
10
13
@@ -22,11 +25,13 @@ env:
22
25
23
26
Kamal uses dotenv to automatically load environment variables set in the `.kamal/secrets` file.
24
27
25
-
If you are using destinations, secrets will instead be read from `.kamal/secrets.<DESTINATION>` if it exists.
28
+
If you are using destinations, secrets will instead be read from `.kamal/secrets.<DESTINATION>` if
29
+
it exists.
26
30
27
31
Common secrets across all destinations can be set in `.kamal/secrets-common`.
28
32
29
-
This file can be used to set variables like `KAMAL_REGISTRY_PASSWORD` or database passwords. You can use variable or command substitution in the secrets file.
33
+
This file can be used to set variables like `KAMAL_REGISTRY_PASSWORD` or database passwords.
34
+
You can use variable or command substitution in the secrets file.
Copy file name to clipboardexpand all lines: docs/configuration/overview.md
+27-7
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
1
---
2
+
# This file has been generated from the Kamal source, do not edit directly.
3
+
# Find the source of this file at lib/kamal/configuration/docs/configuration.yml in the Kamal repository.
2
4
title: Kamal Configuration
3
5
---
4
6
@@ -8,17 +10,21 @@ Configuration is read from the `config/deploy.yml`.
8
10
9
11
## [Destinations](#destinations)
10
12
11
-
When running commands, you can specify a destination with the `-d` flag, e.g., `kamal deploy -d staging`.
13
+
When running commands, you can specify a destination with the `-d` flag,
14
+
e.g., `kamal deploy -d staging`.
12
15
13
-
In this case, the configuration will also be read from `config/deploy.staging.yml` and merged with the base configuration.
16
+
In this case, the configuration will also be read from `config/deploy.staging.yml`
17
+
and merged with the base configuration.
14
18
15
19
## [Extensions](#extensions)
16
20
17
21
Kamal will not accept unrecognized keys in the configuration file.
18
22
19
-
However, you might want to declare a configuration block using YAML anchors and aliases to avoid repetition.
23
+
However, you might want to declare a configuration block using YAML anchors
24
+
and aliases to avoid repetition.
20
25
21
-
You can prefix a configuration section with `x-` to indicate that it is an extension. Kamal will ignore the extension and not raise an error.
26
+
You can prefix a configuration section with `x-` to indicate that it is an
27
+
extension. Kamal will ignore the extension and not raise an error.
22
28
23
29
## [The service name](#the-service-name)
24
30
@@ -85,9 +91,14 @@ env:
85
91
86
92
Used for asset bridging across deployments, default to `nil`.
87
93
88
-
If there are changes to CSS or JS files, we may get requests for the old versions on the new container, and vice versa.
94
+
If there are changes to CSS or JS files, we may get requests
95
+
for the old versions on the new container, and vice versa.
89
96
90
-
To avoid 404s, we can specify an asset path. Kamal will replace that path in the container with a mapped volume containing both sets of files. This requires that file names change when the contents change (e.g., by including a hash of the contents in the name).
97
+
To avoid 404s, we can specify an asset path.
98
+
Kamal will replace that path in the container with a mapped
99
+
volume containing both sets of files.
100
+
This requires that file names change when the contents change
101
+
(e.g., by including a hash of the contents in the name).
91
102
92
103
To configure this, set the path to the assets:
93
104
@@ -97,7 +108,8 @@ asset_path: /path/to/assets
97
108
98
109
## [Hooks path](#hooks-path)
99
110
100
-
Path to hooks, defaults to `.kamal/hooks`. See [Hooks](/docs/hooks) for more information:
111
+
Path to hooks, defaults to `.kamal/hooks`.
112
+
See [Hooks](/docs/hooks) for more information:
101
113
102
114
```yaml
103
115
hooks_path: /user_home/kamal/hooks
@@ -169,6 +181,14 @@ How long to wait for a container to drain, default 30:
169
181
drain_timeout: 10
170
182
```
171
183
184
+
## [Run directory](#run-directory)
185
+
186
+
Directory to store kamal runtime files in on the host, default `.kamal`:
0 commit comments