View Source Dragonfly.FlyBackend (dragonfly v0.1.4)
The Dragonfly.Backend using Fly.io machines.
The only required configuration is telling Dragonly to use the
Dragonfly.FlyBackend by default and the :token which is your Fly.io API
token. These can be set via application configuration in your config/runtime.exs
withing a :prod block:
if config_env() == :prod do
config :dragonfly, :backend, Dragonfly.FlyBackend
config :dragonfly, Dragonfly.FlyBackend, token: System.fetch_env!("FLY_API_TOKEN")
...
endTo set your FLY_API_TOKEN secret, you can run the following commands locally:
$ fly secrets set FLY_API_TOKEN="$(fly auth token)"