Skip to content

Setup

Prerequisites

This page describes how to run the development environment. You can run the development environment locally, or in a docker container.

Local

This is the recommended way to run the development environment, for ease of use and speed. - python - pip - Running Postgres image

Use pip to install PDM, the package manager used for this project.

pip install pdm

Install the dependencies with PDM

pdm install

You can now run the ov command to interact with the development environment.

Help! How do I ... ?

For a full list of available commands, run

ov -h

For additional information, see the dev#ov section of the development documentation.

Activate virtual environment

If you are not already in a virtual environment, activate the one created by PDM.

$(pdm venv activate)

Database

The development environment requires a running Postgres database. The easiest way to run this is with a docker container.

docker run --name ov-db -e POSTGRES_PASSWORD="YOUR POSTGRES PASSWORD HERE" -p 5432:5432 -d postgres:alpine

Docker

The development environment can also be run in docker containers, which includes a database configuration. - docker compose installed

Requirements

Running the services outside of docker is possible, but not supported in this context.

Setup

0. Clone repository

Clone repository
git clone https://github.com/WGBH-MLA/ov-wag.git

1. Create the backend secrets file

In ov-wag, create a file called .env with the following contents:

ov-wag/.env
OV_DB_ENGINE=django.db.backends.postgresql
OV_DB_PORT=5432
OV_DB_NAME=ov
OV_DB_USER=postgres
OV_DB_PASSWORD="YOUR POSTGRES PASSWORD HERE"

OV_BASE_URL=http://localhost:3000
OV_ADMIN_BASE_URL=http://localhost:8000

2. (Optional) Build the backend

If you have local changes, you can build the backend image locally:

Build the backend
ov b

3. Start the backend

Start the backend
ov d
You can now visit the admin interface at http://localhost:8000/admin

4. Create a superuser

Create a superuser
ov m createsuperuser

Follow the prompts to create an admin user.

5. Start the frontend

Add frontend setup instructions

Make this link work! ov-frontend setup