Open source shuttle/bus ticketing system
-
Download project
-
Download git project
git clone https://github.com/autlamps/tessera-backend.git
-
Move into dir
cd tessera-backend
-
Checkout the dev branch (or master preferably if it's available)
git checkout origin/dev
-
-
Setup environment variables
Assumes linux environment.
# Django key used to sign cookies and api tokens (keep this secret) # Can use this website: https://www.miniwebtool.com/django-secret-key-generator/ export KEY=$SOMESECRETKEY # Disable debug mode (absolutely do not leave debug=true in production) export DEBUG=False | True # Set hostname (where this api is being hosted) export HOSTNAME=$HOSTNAME # Database (postgres formatted db url export DATABASE=postgres://USER:PASSWORD@HOST:PORT/NAME # Generate public and private keys using http://travistidwell.com/jsencrypt/demo/ # you will need to delete all newlines and ensure the key is one line only # Tessera-backend will parse this key correctly # Public Key export PUBLIC_KEY=$PUBLIC_KEY # Private Key (keep this secret) export PRIVATE_KEY=$PRIVATE_KEY
-
Install pip dependencies
pip install -r requirements.txt
-
Run gunicorn
gunicorn -b 0.0.0.0:$PORT tessera.wsgi
Preferably run this in docker. This is left as an exercise for the reader.
Once the server is setup and running api documentation can be found at $HOSTNAME/docs/
Tessera-backend is licensed under the MIT license.