/backend

Primary LanguagePython

Run Status Coverage Badge

Installation

Copy .env.example to .env and fill variables

Manual

  1. Create database:
    # create user krddevdays with password 'krddevdays';
    # create database krddevdays owner krddevdays;
  2. Initial virtualenv:
    $ pipenv --python 3.7
    $ pipenv sync
  3. Migrate database:
    $ ./manage.py migrate
    $ ./manage.py createsuperuser

via docker-compose:

  1. Build:
    $ docker-compose build
  2. Start:
    $ docker-compose up postgres
    $ docker-compose up app
  3. Run management command like:
    $ docker exec -it backend_app_1 /bin/sh
    /app # ./manage.py createsuperuser

Test

# pipenv install --dev
# ./manage.py test --keepdb