Proof of concept onto how to deploy apps to fly.io using only the GraphQL API
Fly.io has a handy GraphQL API we can use to both create and deploy apps.
For this proof of concept we will be deploying a livebook (using docker hub's livebook/livebook image) app using only your fly auth token (How to get a token?). I do not persist your token in any way, rest assurred.
This project was first conceived as I wanted to quickly create an online livebook session me and a friend would be able to access together and eventually kill it when it was not useful anymore to us.
For future features we consider:
Much from this code was based on insights I've gained from FlyCtl CLI, tweaking aroung the GraphQL playground and code from the dashboard example so I have to be thankful for those who contributed to those projects.
To start your Phoenix server:
mix deps.get
mix ecto.setup
mix phx.server
or inside IEx with iex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.