The website is built in a multi-container Dockerized application with an Angular front-end and a Python Django Backend connecting to a PostgreSQL database. The instructions below will allow you to install a local version and run the website on local host.
The website runs inside three docker containers: 1) dfrm_fe, 2) dfrm_be, and 3) postgres. To use docker you must first download Docker Desktop
from https://www.docker.com/products/docker-desktop/.
Download PostgreSQL from https://www.postgresql.org/.
Clone the dfrm_website repository to your computer. The command below will also intialize and update the dfrm_be and dfrm_fe submodules upon initial clone:
Create and save two .env files.
Open the terminal and run: > docker compose up --build -d (In prod you must reference the correct compose.yml file: docker compose -f docker-compose.prod.yml up --build -d)
The PostgreSQL database should population automatically with the dump file contained within the GitHub repository. Below are some helpful items:
The dump file should be restored using: pg_dump -U postgres -d dfrm_be -Fp -f backupname.sql
To activate Bash in the postgres container: > docker exec -it postgres /bin/bash
You can access and interact via psql within the container.
Use Ctrl+D to navigate out of psql/bash and back to the root directory in the terminal.
Shut down the containers with: > docker compose down (In prod you must reference the correct compose.yml file: docker compose -f docker-compose.prod.yml down)