Repository navigation
Setting The App Up
This is a pretty long process and easy to mess up, so make sure you know how to use IIS and python beforehand
You'll need to install the following:
- Git: To download the app
- Python 3.9: To run the app
- MySQL Server: To act as the database
- IIS: To host the site
- ActiveDirectory (can be on a different server): To authenticate with
First and foremost, you need to download the code, navigate to the folder where you want the code to be downloaded and run the following:
git clone https://github.com/Bwc9876/CodeReview.git
cd CodeReviewThis will download the app.
Next up, you'll want to create a python virtual environment to run the app in, you can do this by running the following:
python -m venv venvThis will create a new folder named "venv" in the app directory.
Now that we made the virtual environment, we need to activate it, this is done by running:
./venv/Scripts/activate.ps1Now you should see (venv) in the current line, this indicated the environment was activated successfully.
Now we need to install dependencies, this is done by running:
pip install -r requirements.txtIn addition, run the following to install wfastcgi, which we use to host the app on IIS
pip install wfastcgiNow we have our dependencies installed.
Now we'll need to setup environment variables, look at the environment variables section of the README for more info on what each one does.
Now, create a new file in the CodeReview folder named "env.ps1".
Fill it out in this format, replacing "KEY" with the environment variable's name and VALUE with it's value.
$Env:KEY=VALUEMake a new line for each environment variable.
We have now set up our environment variables.
Next up, we'll set up our database, start off by opening a new powershell window and navigating to the CodeReview folder and executing the following.
./venv/Scripts/activate.ps1
./env.ps1Now, run the following to set up the database.
python manage.py migrateThis will create the necessary tables for the app.
Before closing the powershell window from the database section, run the following to copy static files to the proper folder.
python manage.py collectstaticSay yes to any warnings about overriding old files.
We've now set up our static files.
Made By Ben C
Report An Issue