pulibrary / dpul-collections

An inspiring environment for global communities to engage with diverse digital collections
1 stars 0 forks source link

DpulCollections

Project Setup for Development and Test environments

Every time setup

Do these things every time you start new work in this project in dev or test

Development environment

Now you can visit localhost:4000 from your browser.

Running Tests

Occasional tasks for Development and Test environments

Figgy Fixtures

We copy fixtures from Figgy's production database into a Docker container so that we can easily use it for testing indexing. To rebuild that container:

Code contributions

Remember to check formatting before pushing commits.

Production tasks

Deployment

  1. Connect to VPN
  2. BRANCH=<branch> ./bin/deploy staging

For more details about an individual deployment, and to view logs, go to the jobs section of our nomad UI.

Connecting to Staging Shell or IEX Console

  1. Connect to VPN
  2. ./bin/console staging [bash/repl]

Build & Run Production Docker Image Locally

Build Docker Image: docker build . -t dpul-collections

The SECRET_KEY_BASE below is just a filler one for the purpose of testing locally.

Run Docker Image: docker run -t -p 4000:4000 -e DATABASE_URL='ecto://postgres:@host.docker.internal:5434/database' -e SECRET_KEY_BASE='B8rwzeX3DFLveiJ4cP28lRGc0PWdEr8ZF/hDoPRucw95Nzf2IPnu7lhEB+Yldx6Z' dpul-collections