sul-cidr / scriptchart-backend

Admin UI and API for Scriptchart
https://db.syriac.reclaim.hosting/admin
MIT License
1 stars 0 forks source link

Syriac DASH Scriptchart Backend

Admin UI and API for DASH

Development

With a working version on Python 3.7+ and Pipenv:

  1. Install dependencies (use sync instead of install to use Pipfile.lock instead, and ensure a deterministic enviroment)

    $ pipenv sync --dev
  2. Create a database (if not created yet) and migrate. A DATABASE_URL can be defined in a .env file or set as an environment variable. See .env_tempate and here for details. It will default to sqlite:///tmp/db.sqlite. (If using MySQL, see the note about MySQL drivers in scriptchart/settings.py)

    $ touch tmp/db.sqlite
    $ pipenv run python manage.py migrate
  3. Create a superuser

    $ pipenv run python manage.py createsuperuser
  4. (Optional) Download and load a database dump

    $ pipenv run python manage.py loaddata tmp/scripts.json
  5. Start development server and go to http://localhost:8000/admin/

    $ pipenv run python manage.py runserver localhost:8000

Testing

Deployment

Deployment will happen automatically upon a sucessful merge/rebase from develop to master.