Workaround for KAMAL_DESTINATION not available in Docker container env vars #1635
Replies: 2 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
|
If you use kamal with cron and execute like the documentation suggests[1]: Then cron will fail with something similar to: The error will be caused by an environment variable that has no value and makes cron choke. In my case it was If this is the case, we should either filter the ENV vars to not include empty ones or just not make |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey friends, love Kamal! using it for everything now.
I noticed that
KAMAL_DESTINATIONisn't available as an env var in my docker containers that are deployed by specifying a destination. iekamal deploy -d stagingorkamal deploy -d production. I saw that #1019 exists, but here's how I tested.The workaround I'm using is this.
deploy.staging.yml:deploy.production.yml:Its a little redundant but it should be forwards-compatible until available if you're coming here for same question. :)
Made a quick PR to not need this workaround #1634.
Beta Was this translation helpful? Give feedback.
All reactions