spraakbanken / sparv-backend

Sparv web service
MIT License
2 stars 0 forks source link
sparv

sparv-backend

There are several options for running the Sparv backend:

  1. in a Docker environment
  2. with gunicorn
  3. with waitress (mostly for testing purposes)

Installation

Installation of additional components

Running the Sparv backend

  1. With Docker: [add commands]

  2. With gunicorn (you may want to adapt the settings in gunicorn_config.py):

    PATH_TO_BACKEND=`pwd`
    $PATH_TO_BACKEND/app/venv/bin/gunicorn --chdir $PATH_TO_BACKEND/app -c $PATH_TO_BACKEND/app/gunicorn_config.py app
  3. With waitress (run with python3):

    PATH_TO_BACKEND=`pwd`
    python $PATH_TO_BACKEND/app.py

Setup cronjob for cleaning up old builds

1 0 * * * curl [URL-TO-SPARV-BACKEND]/cleanup?secret_key=