The backend can be run inside a docker container for testing purposes.
To build and start backend with database to be stored in your ~/ksi-be execute ./.docker/build.sh --run ~/ksi-db ~/ksi-data.
Already built docker images can be started by running ./.docker/start.sh ~/ksi-db ~/ksi-data or docker start -i ksi-be if it was started at least one time before.
Though most of the API works out-of-the box, it is possible that you will run into unexpected errors. If so, please create Issue with report and reproduction steps.
- Python 3.7+
- virtualenv
- packages from
requirements.txt - isolate
- Clone this repository.
- Run
init-makedirs.sh. - Install virtualenv & packages into
ksi-py3-venvdirectory.virtualenv -p python3 ksi-py3-venv source ksi-py3-venv/bin/activate pip3 install -r requirements.txt - Enter db url into
config.pyfile. Format is the same as specified inconfig.py.dist - Uncomment part of the
app.py, which creates database structure. - Run the server, comment the database-create-section in
run.py - Install
isolatewith box directory/tmp/box. - Bind-mount
/etcdirectory to/opt/etc(this is required for sandbox to work):Do not forget to add it to$ mount --bind /etc /opt/etc/etc/fstab. - Optional: make
/tmptmpfs. - Optional: ensure the server will be started after system boots up
(run
./runner start).
- To start server run:
./runner start. - To stop server run:
./runner stop. - The
runnerscript must be executed in server`s root directory. - Logs are stored in
/var/log/gunicorn/*.