Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.53 KB

README.md

File metadata and controls

41 lines (25 loc) · 1.53 KB

Student DB API

Trimmed-down version of Bigchaindb API.

This repository includes an API around a MongoDB to restrict user access. All endpoints are secured by Bearer Authentication, the Json Web Tokens are generated by Auth0. The API is built using Connexion, the first framework for Python to implement OpenAPI. It is served via gunicorn and watched by supervisor.

Preparation

  1. Clone the repository and navigate inside it

  2. Change the environment variables in the docker-compose.yml and docker-compose-dev.ymlwithin the student_db_api service (lines 11-15)

    AUTH0_DOMAIN: "your.domain.auth0.com"
    API_IDENTIFIER: "https://your.domain/yourapi"
    UPORT_ISSUER: "yourUportIssuer"
    UPORT_VALIDATION_URL: "http://yourhost:8080/validateJWT"
    

Build

The development file:

$ docker-compose -f docker-compose-dev.yml build

The production file:

$ docker-compose build

Run

If you only want to run the stack in development, run

$ docker-compose -f docker-compose-dev.yml up

The API UI can be found at http://localhost:8000/v0.1/ui. However, it can not be used because the requests are missing the JWTs.

For production, make sure that the Api Aggregator is running and the interconnector network is established. If this is given, you can run

$ docker-compose up