An experiment in elixir. Collaboration born out of discussions at Samvera Connect 2019.
You can run a local development and test environment with devstack. It is docker-based and has good documentation in its README.
We'll use postgres and elasticsearch. You can also run pgadmin and kibana for inspecting those services, respectively.
We're using Pow
for Ecto-backed user authentication, and PowAssent
for Github authentication. The application requires two environment variables which you should put in a .env
file in the project root and must contain:
# .env
export GITHUB_CLIENT_ID=[your-client-id]
export GITHUB_CLIENT_SECRET=[your-client-secret]
Please see the PowAssent documentation for more information on setting up the provider.
To start your Phoenix server:
mix deps.get
mix ecto.setup
cd assets && yarn install
source .env
to configure Github authentication.mix phx.server
. Or use iex -S mix phx.server
for a repl and server in one!Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
Ensure devstack is running your test services with devstack -t up -d db
Run tests with mix test
Run tests and generate a coverage report with mix test --cover
mix elasticsearch.build resources --cluster DigitalCollex.ElasticsearchCluster