samvera-labs / digital_collections_elixir_example

Proof of concept digital collections Elixir Application done as a collaboration between Princeton and Northwestern University.
0 stars 1 forks source link

DigitalCollex

An experiment in elixir. Collaboration born out of discussions at Samvera Connect 2019.

Get Started

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:

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Run tests

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

Index

mix elasticsearch.build resources --cluster DigitalCollex.ElasticsearchCluster

Learn more