Skip to content

Local radio and video news feed for Alexa, with LiveView UI, build with Elixir

License

Notifications You must be signed in to change notification settings

alexiob/flashfeed-elixir

Repository files navigation

Flashfeed (Elixir version)

Local radio and video news feed for Amazon (and friends, eventually), build with Elixir.

Exercises:

Flashfeed UI

Local Build

mix deps.get
mix phx.swagger.generate

Note: when LiveView version is updated we need to update the assets as well

cd assets && npm install phoenix_live_view --force

Local Docker Build

docker build -t flashfeed-elixir:latest .

Local Start

Elixir

mix run --no-halt

Docker

Needs network and user access to a Postgres DB.

export FLASHFEED_DB_DATABASE="flashfeed"
export FLASHFEED_DB_USERNAME="postgres"
export FLASHFEED_DB_PASSWORD="postgres"
export FLASHFEED_DB_HOSTNAME="database"
export FLASHFEED_DB_PORT="5432"

export FLASHFEED_HOST_FOLDER_MNESIA="$(pwd)/tmp/docker/mnesia"

mkdir -p $FLASHFEED_HOST_FOLDER_MNESIA

docker stop flashfeed-elixir

docker run -e FLASHFEED_DB_DATABASE \
-e FLASHFEED_DB_USERNAME \
-e FLASHFEED_DB_PASSWORD \
-e FLASHFEED_DB_HOSTNAME \
-e FLASHFEED_DB_PORT \
--volume ${FLASHFEED_HOST_FOLDER_MNESIA}:/mnt/mnesia \
--name flashfeed-elixir \
--rm \
-p 41384:41384 \
-t flashfeed-elixir:latest

Endpoint Test

curl -X GET http://localhost:41384/api/v1/feed/amazon_alexa/rainews/rainews/it/fvg/gr