Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.23 KB

File metadata and controls

81 lines (55 loc) · 2.23 KB

tCF Developer Info

Ensure your system has Git and Docker installed.

Setup

  1. Clone the project:
git clone https://github.com/thecourseforum/theCourseForum2.git
cd theCourseForum2
  1. Setup environment variables
cp .env.example .env
  1. Build the project
docker compose build --no-cache
  1. Wait for the Django server to finish building (i.e. ✔ Service web Built is visible in stdout).
  2. Download and place the latest database backup (should be named latest.dump) from Google Drive into db/latest.dump in your local repo.
  3. Update the database:
./scripts/reset-db.sh
  1. Start the server
docker compose up
  1. Ensure the website is up, running, and functional at localhost:8000.

VSCode Setup

When you open the project, VSCode may prompt you to install the recommended extensions for this project. Click yes and ensure that they are in your extension library. A list of the necessary libraries can be found here.

Common Issues

  • Docker build error => CANCELED [internal] load build context
    • This occurs because of a Windows compatibility issue with Docker. As of December 19, 2023, downgrade Docker to version 4.19, then re-build the project.

Stack

The application stack is listed below. These technologies were chosen because they are robust and align with the stack that UVA students learn in courses.

  • Python
  • Django
  • PostgreSQL
  • Bootstrap 4
  • Javascript (jQuery)

Enter docker container

docker exec -it tcf_django /bin/bash

CI checks locally

ruff check .
ruff format --check .
djlint tcf_website/templates --check --lint
ty check
npm ci && npx eslint -c .config/.eslintrc.yml tcf_website/static/
python manage.py migrate
coverage run manage.py test

GitHub Actions sets GITHUB_ACTIONS=true so the same module runs with DEBUG=False and without the debug toolbar; see .github/workflows/ci.yml.