2020-12-15 08:58:29 +01:00
|
|
|
# Recycled Cloud Management Interface
|
2020-12-15 08:45:34 +01:00
|
|
|
|
2020-12-15 13:48:27 +01:00
|
|
|
[![builds.sr.ht status](https://builds.sr.ht/~fnux.svg?search=recycledcloud-management)](https://builds.sr.ht/~fnux?search=recycledcloud-management)
|
|
|
|
|
2020-12-15 08:58:29 +01:00
|
|
|
This repository tracks the initial work for a web interface atop the recycled
|
|
|
|
cloud. It is written in [Elixir](https://elixir-lang.org/), making use of the
|
|
|
|
[Phoenix Web Framework](https://www.phoenixframework.org/).
|
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
* The (Phoenix) project has been initialized with the `--no-webpack` and
|
|
|
|
`--no-dashboard` flags to avoid unnecessary clutter. We can add them back
|
|
|
|
later if needed!
|
2020-12-15 13:48:27 +01:00
|
|
|
* (sourcehut) CI is defined in `.build.yml`. It currently runs on my sr.ht
|
|
|
|
account since we do not have our own instance (yet).
|
2020-12-15 14:24:14 +01:00
|
|
|
* Authentication is based on José Valim and Aaron Renner's
|
|
|
|
[Phx.Gen.Auth](https://hex.pm/packages/phx_gen_auth), adapted for LDAP-backed
|
|
|
|
authentication.
|
2020-12-15 08:58:29 +01:00
|
|
|
|
|
|
|
## Getting Started
|
|
|
|
|
|
|
|
You'll need Erlang/OTP and elixir installed on your system. It usually boils
|
|
|
|
down to installing the `elixir` package of your distribution. Once done, you
|
|
|
|
can:
|
2020-12-15 08:45:34 +01:00
|
|
|
|
|
|
|
* Install dependencies with `mix deps.get`
|
|
|
|
* Create and migrate your database with `mix ecto.setup`
|
2020-12-15 08:58:29 +01:00
|
|
|
- You'll need PostgreSQL here. I (tfloure) usually run it in an isolated
|
|
|
|
container with something along the lines of `podman run --rm -it -e
|
|
|
|
POSTGRES_HOST_AUTH_METHOD=trust --expose 5432 -p 5432:5432
|
|
|
|
postgres:latest`.
|
2020-12-15 09:02:51 +01:00
|
|
|
* Start Phoenix endpoint with `mix phx.server` (or `iex -S mix phx.server`,
|
|
|
|
if you want a REPL).
|
2020-12-15 08:45:34 +01:00
|
|
|
|
|
|
|
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
|
|
|
|
|
2020-12-15 08:58:29 +01:00
|
|
|
## Useful Resources
|
2020-12-15 08:45:34 +01:00
|
|
|
|
2020-12-15 09:02:51 +01:00
|
|
|
Elixir Language:
|
|
|
|
|
|
|
|
* (Good!) Introduction and various guides: https://elixir-lang.org/getting-started/introduction.html
|
|
|
|
* Elixir Docs: https://hexdocs.pm/elixir/Kernel.html
|
|
|
|
* Mix (= build tool) Docs: https://hexdocs.pm/mix/Mix.html
|
|
|
|
* IEx (= REPL) Docs: https://hexdocs.pm/iex/IEx.html
|
|
|
|
|
2020-12-15 08:58:29 +01:00
|
|
|
Phoenix Web Framework:
|
2020-12-15 08:45:34 +01:00
|
|
|
|
|
|
|
* 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
|