Skip to content
Snippets Groups Projects
Select Git revision
  • generic-api-v1
  • master default protected
  • dependency-injection
  • Debugger
  • swagger
5 results

backend

  • Clone with SSH
  • Clone with HTTPS
  • David Beniamine's avatar
    b96e67e1
    History

    Mirador backend

    Get the project

    git clone gitlab@gitlab.tetras-libre.fr:iiif/backend.git && cd backend

    Install and run

    Docker (preferred method)

    Requirements

    Install and run

    cp .env.sample .env
    # Edit .env file to suit your needs
    docker-compose up

    If everything is ok, http://localhost:5000/swagger-ui/ contains the available API.

    Populate database

    ./cli mysql_init

    View and edit database

    Use ./cli mysql or PHPMyAdmin on http://localhost:5001/ (check if phpmyadmin.yml is in your COMPOSE_FILE)

    Run tests

    ./cli test

    Everything else

    Check the available commands from the CLI :

    ./cli help

    Local (Not working, cause to mariaddb connexctor, see setup.py)

    Requirements

    • virtualenv (optionnal)
    • Python >= 3.10

    Dev mode

    1. Optionnal create a virtual env :

      • virtualenv venv && . venv/bin/activate
      • OR python3 -m venv venv && . venv/bin/activate
    2. Install dependencies pip install -e .

    3. cp .env.sample .env and edit .env file to suit your needs

    4. Run flask --debug --app Mirador_backend.app run

    5. Go to http://localhost:5000/swagger-ui/

    Production mode

    TODO

    Production mode

    TODO