Deploy a simple app in Fly.io

Hi :slight_smile:

I never deploy an app so i’m learning, i want deploy an app in fly.io, my app use Elixir and Phoenix Live View, i only have two simple live views and i save a name and a descripction of a product my app it’s a shopping list that update in realtime, i don’t have Users, etc… i only have a simple migration with a table, now how can i deploy this app using Fly.io ?

I read that you can create your own database for the same app using a command like flyctl postgres create :thinking: but i’m not sure if i need add something to my proyect or config something…

I want do this for free :slight_smile: it’s only for learn purpose :slight_smile: thanks!

I run the command fly launch and it opens a tab for config the project, how can i config the database ?:thinking:

This is the first result if I Google: “deploy phoenix to fly io”.
https://hexdocs.pm/phoenix/fly.html

1 Like

When you run fly launch, make sure to select or add a postgres database. After that, run fly deploy in the terminal, that should start the deploy process.

The db uri is automatically added by fly and set as a env variable. With a standard phoenix setup it should just work

1 Like

Thank you so much it works :slight_smile: