This project is designed to run on a Ubuntu 18.04 machine with port 80 open using nginx, supervisor, gunicorn and python 3.7(works with 3.X as far as i know). This project is intended for training and demonstraion purposes and was developed by me for use in a workshop teaching masters students at Linköpings university about server deployment.
- clone this repo to your VPS.
- Install base dependencies: python-3, python3-venv, supervisor, nginx
- create a virtual environment with: python3 -m venv venv
- Activate the venv and install the requirements in requirements.txt
- install gunicorn with: pip install gunicorn
- Create the database by running the init_db.py script
- Change the xxxx text in configuration/server.conf to the current user on your machine (if you dont know who you are, type whoami in the terminal).
- Copy the file configuration/server.conf into /etc/supervisor/conf.d/
- reload supervisor with: sudo supervisorctl reload
- copy the file configuration/server into /etc/nginx/sites-enabled/ (remove any default file created by nginx)
- reload nginx with: sudo service nginx reload