Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
/ artus Public archive

Bibliographic database of the International Arthurian Society

License

Notifications You must be signed in to change notification settings

mntns/artus

Repository files navigation


Inline docs

Phoenix application used to run the bibliographical database of the International Arthurian Society

Building

To build the application in development:

https://github.com/EddyShure/artus
cd artus/
mix do deps.get, compile

Make sure, your PostgreSQL instance is running and setup the database:

mix ecto.setup

Install JS dependencies:

yarn install

Installation on production server

The following steps should provide a brief outline to installing the application on a production server from scratch. You should already have some knowledge about systems administration, PostgreSQL and nginx.

  1. Have a properly configured production machine. DNS, iptables and so on.
  2. Install PostgreSQL, configure it, create an empty database (i.e. artus_prod) or load a SQL dump. Also, install the latest Erlang runtime.
  3. Setup a nginx installation that is configured to reverse-proxy to localhost:8888. Make sure it handles SSL connections and use Let's Encrypt.
  4. Get a SendGrid API key.
  5. Put your SendGrid API key and PostgreSQL credentials into a config/prod.secret.exs. See this guide for more information.
  6. Deploy the application from your development machine (see below).
  7. Create a systemd service for the application. You can use rel/artus.service as an example.

Deployment from development machine

Deployment is straightforward. Contact Niklas Kunz for the SSH key and then simply run:

./rel/deploy.sh

If there are any migrations to run, execute this command:

bin/artus command Elixir.Release.Tasks migrate