Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting env variables in the docker arguments requires having them on the deploy host.
Instead we'll add two new commands
kamal env push
andkamal env delete
which will manage copying the environment as .env files to the remote host.Docker will pick up the file with
--env-file <path-to-file>
. Env files will be stored under<kamal run directory>/env
.Running
kamal env push
will create env files for each role and accessory, and traefik if required.kamal envify
has been updated to also push the env files.By avoiding using
kamal envify
and creating the local and remote secrets manually, you can now avoid accessing secrets needed for the docker runtime environment locally. You will still need build secrets.One thing to note - the Docker doesn't parse the environment variables in the env file, one result of this is that you can't specify multi-line values - see moby/moby#12997.
We maybe need to look docker config or docker secrets longer term to get around this.
Hat-tip to @kevinmcconnell - this was his idea.
Docs PR: basecamp/kamal-site#22