I have two questions about deploying to different environments:
- Can we customize a different .toml file to deploy to different environments?
- How to separate different secrets for different environments with the same key but different values?
I have two questions about deploying to different environments:
You can pass -c flag to most commands so for example create a staging env like:
fly launch -c fly.staging.toml
# And you can set secrets specific to that app using:
fly secrets set KEY=VALUE -c fly.staging.toml
Whenever you want to deploy just use fly deploy to use fly.toml (default) or fly deploy -c fly.staging.toml.
If you use GitHub actions you can even:
And if you want isolation between environments (for example to give access for staging for some folks but not prod):
Many thanks! I will try that, I use GitHub.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.