This project is a driver incentive program developed in Python using the Flask framework. It is for Dr. Van Scoy's CPSC 4910 class.
It is recommended that you run this project under a venv, but it is not necessary. To install these modules, run the command below inside of the root dir of the project repo:
python3 -m pip install -r requirements.txt
There are two servers that need to be setup prior to running this: nginx and gunicorn. Nginx will be through a server config file, and gunicorn through a systemd service file
For this setup, please follow the steps below. Sidenote: This setup will not include SSL configuration.
- Run
sudo apt-get install nginx
- Copy
config/nginx_config
to/etc/nginx/sites-enabled
- Delete any other config files in above dir
- Run
sudo nginx -s reload
- Test by going to your url, at this point it should have a 500 error
This setup involves using a systemd service config
- Install gunicorn if you haven't already with
pip3 install gunicorn
- Copy
config/project.service
to/etc/systemd/system
(you will need to use sudo here) - Run
sudo systemctl daemon-reload
- Run
sudo systemctl enable project
- Run
sudo systemctl start project
At this point, you should be able to access the site from it's public IP address or domain and see the login page
If you are reading this and it came with a zip of the code, there should be an included .env file that is preconfigured, but if not let one of us know it is crucial to this project.