A small RSS Reader using Phoenix LiveView and Alpine.js
Requirements:
- Erlang 24
- Elixir 1.12
- Postgresql 2.6
To install all language dependencies with ASFD, simply run asdf install
from this directory.
To start your Phoenix server in development mode:
- A running Postgresql server is required. You can start one with docker by running
docker-compose up
from this directory. - 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.
The default admin user is [email protected]
with the password password
.
To start in production mode with Docker:
- Go in the
release
directory. - Update the
docker-compose.yml
to set theSECRET_KEY_BASE
andHOST
environment variables.- You can generate a key with the
mix phx.gen.secret
command.
- You can generate a key with the
- Run
docker-compose up
.
Now you can visit localhost:4000
from your browser and connect with the [email protected]
user.
To deploy this app in production mode on a CapRover instance:
- Use CapRover's One-Click App tools to create a PostgreSQL app.
- Create an empty app for Agregat.
- Look at the default environment variables in the
captain-definition
file and add overrides them if necessary. You must set theSECRET_KEY_BASE
andHOST
variables. - Deploy the app by running
caprover deploy
and select the empty app you created previously.
To build and push a new docker image:
- Connect to Github Container Registry with
docker login ghcr.io -u USERNAME -p TOKEN'
- Run
release/push.sh
to push a new image with thelatest
tag. - Run
release/push.sh TAG
to push an image with a specific tag.
- Phoenix Framework: https://www.phoenixframework.org/
- Phoenix LiveView: https://hexdocs.pm/phoenix_live_view/
- Alpine.js: https://alpinejs.dev/
- Classless.css: https://classless.de/
- FontAwesome: https://fontawesome.com/
- CapRover: https://caprover.com/