Skip to content

Installation

Jana Rajakumar edited this page Feb 26, 2018 · 2 revisions

Installation

1. Requirements

  • The following packages are required.

    djangorestframework = "==3.6.4"
    "django-rest-framework-mongoengine" = "==3.3.1"
    mongoengine = "==0.9"
    pymongo = "==2.8"
    "django-test-addons" = "*"
    "djangorestframework-jwt" = "*"
    "django-nose" = "*"
    coverage = "*"
    "django-extensions" = "*"
    Django = "==1.9"
    "nose-watch" = "*"
    celery = "*"
    

2. Download and Setup Virtual Environment

  • Clone the repository and install required packages.

    git clone https://git.library.utoronto.ca/digitaltoolsmss/iiifAPI.git
    cd iiifAPI
    pipenv install
    pipenv shell
    
  • Pipenv will install all the packages listed in Pipfile file.

  • (Optional) Some packages are used only for development purposes, and can be installed with pipenv install --dev

  • Finally, activate the virtual environment with pipenv shell

2. Setup File

  • The app settings can be found at iiifAPI/settings.py.
  • Things to note:
    • SECRET_KEY: Create your new secret key and replace the existing value.
    • DEBUG: Set to True in development and False in production.
    • ALLOWED_HOSTS: Modify to suite your domain specific settings.
    • MONGO_DATABASE_URI: The full URI of the mongoDB server.
    • REGISTER_SECRET_KEY: Secret key which allows an Admin user to register. Overide this vale in production.
    • IIIF_BASE_URL: Base url to generate the @id field in IIIF objects. Overide this vale in production.
    • IIIF_CONTEXT: Default IIIF @context to use for this API. Currently version 2.0.
    • LORIS_DIRECTORY: The file system directory where LORIS stores all images. Change as needed.
    • LORIS_URL: The fully resolved URL for images served from Loris. Change as needed.
    • QUEUE_POST_ENABLED: If enabled, all POST requests will be served by a Queueing system with 202 Immediate Response.
    • QUEUE_PUT_ENABLED: If enabled, all PUT requests will be served by a Queueing system with 202 Immediate Response.
    • QUEUE_DELETE_ENABLED: If enabled, all DELETE requests will be served by a Queueing system with 202 Immediate Response.
    • QUEUE_RUNNER: The method for processing background taks in Queue system. Choices are: "PROCESS" or "THREAD" or "CELERY"
    • BROKER_URL: Config only if QUEUE_RUNNER is set to "CELERY". RabbitMQ, Redis or any compatible other broker.
Clone this wiki locally