Adding support for .env files with flyctl commands

Hi,

It would be useful to have an option to provide a .env file with flyctl commands.
In my app I’m using .env files, this is a very usual pattern for handling secrets and configuration on your local machine. These two are my current usecases:

  • When I’m running deploy command I have to provide all the envs for the build step one by one using --env flag.
  • When I’m setting or updating secrets again I have to specify all of them one by one.

Both of these would have been easier if I just could save them in a file and run the commands with that file.
I have written a glue script currently for this you can find here. I’m also interested in helping to add this feature to fly. What are you suggestions about how the UX of this feature should be?

1 Like

+1 for this . I thought I could just cat the env file into the --env but then I realized the comments and newlines need to be removed and I’m not a bash wizard.