Provision Elixir and Postgres Servers
To configure and launch your Elixir app, you can usefly launch and follow the wizard.
When you run fly launch from the newly-created project directory, the launcher provides some defaults for your new app, and gives you the option to tweak the settings.
Run:
y at the prompt to open the Fly Launch page, and make the following changes to your app config:
- Change the default app name and region, if needed.
- For Databases, select Fly Postgres, give the Postgres database app a name (for example, your app name with
-dbappended) and choose a configuration.
- Run the deployment setup task
- Build the image
- Set secrets required by (
SECRET_KEY_BASE, for example) - Deploy the application in your selected region
Make sure to note your Postgres credentials from the output.
fly apps open to see your deployed app in action.
Try a few other commands:
fly logs- Tail your application logsfly status- App deployment detailsfly status -a postgres-database-app-name- Database deployment detailsfly deploy- Deploy the application after making changes
Troubleshooting your initial deployment
Since this is an existing Elixir app, its highly likely it might not boot because you probably need to configure secrets or other service dependencies. Let’s walk through how to troubleshoot these issues so you can get your app running.View log files
If your application didn’t boot on the first deploy, runfly logs to see what’s going on.