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:
- Choosing docker image by name
- Setting secrects before deploying
- Setting envyronment variables before deploying
- Any suggestions?
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:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix