Skip to main content
Deploying applications to Fly can be as simple as running:
When the application successfully deploys, you can quickly open it in the browser by running:
If all goes well, you should see a running application in your web browser. You can also view a history of deployments by running:

Troubleshooting a deployment

If a deployment fails, you’ll see an error message in the console. If the error is a Rails stack trace, it will be truncated. To view the entire error message run:
You may need to open another terminal window and deploy again while running fly logs to see the full error message.

Running migrations

For Postgresql, migrations are configured to automatically run after each deployment via the following task in your application’s fly.toml:
Sqlite3 migrations are done by the bin/docker-entrypoint script. To disable automatic migrations for deploys, remove db:prepare lines from these files. Then, to manually run migrations after a deployment, run:

Run ad-hoc tasks after deploying

Sometimes after a deployment you’ll need to run a script or migration in production. That can be accomplished with the Fly SSH console by running: