Here it is boys.
Run: git clone --recursive https://github.com/jgeigerm/KDRPoints/
Then you need a few things.
If you don't want to use mysql then you can use sqlite... just comment out the mysql lines in config.py and uncomment the sqlite line
sudo apt-get install libmysqlclient-dev python-dev mysql-server
Change the root password of your mysql installation :)
Run mysql_setup.sh (you can just keep the defaults, except for the password, which you should define)
Make a new file in the root of the project (where requirements.txt is) called app.vars with the following lines (1-4 are not needed with sqlite)
- The database name
- The database host
- The database username
- The database password
- A random key: Can be whatever (md5 sum something and paste it in there)
- The Google Consumer ID
- The Google Consumer Secret
- Mail server (smtp.google.com)
- Mail port (443)
- Use ssl or not (True)
- Email address
- Email password
Next, start up a virtualenv with the command: virtualenv flask
Enter the virtualenv with the command: source flask/bin/activate
Then install requirements with pip:
pip install -r requirements.txt
Flask-MySQL will fail if you don't install python-dev and libmysqlclient-dev above, if you aren't using MySQL then take that line out of the requirements.txt file, otherwise the installation will fail
The consumer id and secret can be generated at https://console.developers.google.com/project
Create a new project, go to APIs and Auth, then Credentials. Create a new OAuth client ID.
Make sure the redirect URI is http://127.0.0.1:1072/login/authorized or auth will not work
Use the following command to start the server: python run.py
It should work now.
Log in with your kdrib Google account
The user with id 1 will be granted access to the admin panel so use that to make yourself a role or two.
docker-compose up -d then browse to 127.0.0.1:1072