This is the tiny backend implementing Charting Library charts storage.
Python 3x, pip, Django, Djongo
- Install Python 3.x and Pip. Use virtual environment if your host has older python version and it cant be upgraded.
- Install and initialize mongodb service.
- Install
mongosh
CLI and check avaliability of database with name 'test'. Create if it's not. - Go to your charts storage folder and run
pip install -r requirements.txt
. You need to preinstallpython3-pip
package to do it. - Add client.host url from env like at the connector instructions
- Run
python3 manage.py migrate
. This will create database schema without any data. - Generate a secret key by running
python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
- Set your secret key to your environment variables
export SECRET_KEY='...'
- Run
python manage.py runserver
to run TEST instance of your database. Use some other stuff (i.e., Gunicorn) for your production environment. - To run the server in daemon mode use
screen
cli. On next step repeat command from previous step and pressctrl + a + d
to detach from screen. Process will running in background.