Replies: 3 comments 3 replies
-
You can use ERB in deploy.yml to dynamically insert anything including server IPs # Deploy to these servers.
servers:
web:
- <%= ENV['KAMAL_DEPLOY_IP_1'] %> Edited: As mentioned below, I had accidentally used the wrong syntax earlier and have now corrected it. |
Beta Was this translation helpful? Give feedback.
-
Yes, definitely doable, even with multiple IPs, for instance:
You could go as far as to fetch those IPs from your hosting provider API, although I wouldn't necessarily recommend it. |
Beta Was this translation helpful? Give feedback.
-
OK, fine but how to pass env variables from Kamala secrets and 1Password? I can define env vars for the whole service but what but not only for the specific server. I define it currently globally in deploy.yml (this is for Django app)
|
Beta Was this translation helpful? Give feedback.
-
Is it possible to use environment variables for the server IPs? For example,
I get the following error now if I deploy when using the environment variable:
Beta Was this translation helpful? Give feedback.
All reactions