Replies: 2 comments 3 replies
-
|
Kamal chooses the destination-specific secrets file from the deploy destination, not from the service name. The secrets loader reads the common secrets file and then the destination file: The practical layout is: Put shared values in |
Beta Was this translation helpful? Give feedback.
-
|
I may be confusing the documentation with other valuable references found out there. If I understand correctly the above scenario can be realised with As a consequence I would re-write the initial paragraphs of https://kamal-deploy.org/docs/configuration/environment-variables/#secrets My thinking is that it is the docs/configuration section and thus should be explicit |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The docs state
Path to secrets, defaults to .kamal/secrets. Kamal will look for <secrets_path>-common and <secrets_path> (or <secrets_path>.<destination> when using destinations):This leaves a lot of room for varying interpretations. Given one wants to deploy staging and production, one would comply with 2 paragraphs laterrequire_destination: trueand create
.kamal/secrets.staging.kamal/secrets.productionBut what goes into the base file? the shared secrets across all environments?
What then distinguishes it from
-common?Does one run one? or the other? or both?
Now extend the logic across multiple servers - say sharding on a tenancy basis where, practically, each server should have its standalone database. One might have
each file has a distinct host, but refers to a DATABASE_URL that is proper to the environment.
secrets have no reason to change across servers, so should only require the variants for the environment.
But at this point, having defined
require_destination: true, 'staging_first' simply does not match up to 'staging',there is not guarantee the file name will be interpreted accordingly.
and there is no documentation I can find which allows on to specify the destination within the deploy.x.yml file
Beta Was this translation helpful? Give feedback.
All reactions