Instructions:

1. Setup Google Cloud Console OAuth
	- Refer to https://support.google.com/cloud/answer/6158849?hl=en
	- Select ‘Web application’ when prompted
	- Add a javascript origin URI to the client ID for the web application. This should be https://DOMAIN
      - Add a redirect URI to the Client ID for the web application. This should be https://DOMAIN/google-login/callback
	- Note: You will need to change the client from testing to deployment when ready to deploy


2. Setup MySQL database
	- Setup server and create database called tega
	- Create user with permissions to created database
	- You can use docker using a command similar to the following:
	docker run --name tega-mysql -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=tegauser -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=tega -p 3306:3306 -d mysql:latest


3. Install python 3 (tested and working with python 3.11.0)


4. Create and activate virtual environment (optional)
	- Open terminal to base directory of the code
	- python -m pip install --upgrade pip
	- pip install virtualenv
	- virtualenv .venv
	- Refer to the following to activate: https://docs.python.org/3/library/venv.html


5. Install app requirements
	- python -m pip install -r requirements.txt


6. Copy config.py file (next to this file) into base directory of the code


7. Configure copied config.py
	- Follow instructions inside the file


8. Deploy as you like (recommended to use gunicorn & nginx and a Cloudflare tunnel)
	- Refer to gunicorn & nginx deployment: https://docs.gunicorn.org/en/stable/deploy.html
	- Refer to Cloudflare tunnel setup: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/remote/
	- Entrypoint is 'python main.py'
	- Port is 5000



If you run into any problems setting it up, contact me at smithsct@lsbu.ac.uk