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.
-
Clone the repository and navigate inside it
-
Change the environment variables in the
docker-compose.yml
anddocker-compose-dev.yml
within thestudent_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"
The development file:
$ docker-compose -f docker-compose-dev.yml build
The production file:
$ docker-compose build
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