Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 2.15 KB

dev.md

File metadata and controls

57 lines (37 loc) · 2.15 KB

tCF Developer Info

Setup

  1. Ensure your system has Git, Node, Python, PostgreSQL, and Docker installed.
  2. Clone the project:
$ git clone https://github.com/thecourseforum/theCourseForum2.git
$ cd theCourseForum
  1. Download the .env secrets file from the secrets repo and place it in the project root.
  • Note: the file should be named exactly .env, not .env.txt or env.txt - rename if necessary.
  1. Build the project
$ docker compose build --no-cache # from scratch (only necessary the first time)
$ docker compose up
  1. Wait for the Django server to finish building (i.e. tcf_django | Watching for file changes with StatReloader is visible in stdout).
  2. Download and place the latest database backup from Google Drive into db/latest.sql in your local repo.
  3. Update the database:

MacOS/Linux (or Windows, if you're using Git-Bash):

$ sh scripts/reset-db.sh db/latest.sql

If you're on windows, open up scripts/reset-db.sh and run the commands manually (sorry)

  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)