Configuring a Fly Application
Packaging your App
Fly can run apps that use our builders (
fly.toml), and almost any Docker image. For best results, try and keep Docker Images lightweight.
Your application runs in private virtual machines. It must listen for HTTP requests on port 8080.
You can specify secrets for your application using the
flyctl secrets command. These are encrypted, stored in vault, and made available to your application at runtime.
flyctl secrets set command will set one or more application secrets then perform a release.
flyctl secrets set MY_SECRET=romance DATABASE_URL=postgres://example.com/mydb
These will be set as
$DATABASE_URL environment variables within your application processes.
Note: if a secret you set causes your app to crash within 30s, the release will fail and your app will continue to run with previous secrets.
flyctl secrets unset command will clear one or more secret values.
➜ flyctl secrets unset MY_SECRET DATABASE_URL
flyctl secrets list
NAME | DIGEST | DATE +--------------+----------------------------------+---------+ MY_SECRET | b9e37b7b239ee4aefc75352fe3fa6dc6 | 17s ago DATABASE_URL | cdbe3268a82bfe993921b9cae2a526af | 17s ago
For security reasons, we do not allow read access to the plain-text values of secrets.