Skip to content

Flowminder/flowkit-ui-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code style: black CircleCI OpenAPI spec codecov

FlowKit-UI backend

A Flowkit query postprocessing, data management and authentication/authorisation component, designed for use with Flowminder/flowkit-ui.

Requirements

The tool itself is containerised, so as long as you have Docker installed, it will take care of its own dependencies inside its container(s).

To build/run:

  • Docker
  • Make

To commit:

Getting started

Run the app via make. The following command will give you an overview of available targets:

make

You can use the following targets:

  • deps: Regenerate pinned requirements.txt files
  • build: build a new docker image (i.e. use the latest API spec)
  • test: run all unit tests and produce a coverage report
  • run: start the image, using the implementation directory as a bind mount (i.e. changes will be reflected by the flask server on the next API call)

Access the API at http://localhost:5000. The API document can be viewed at http://localhost:5000/openapi.json.

Adding new dependencies

If you need to add any dependencies, add them to src/impl/requirements.in or src/impl/dev-requirements.in and refer to the section above as the docker image will have to be rebuilt.

Building without make

Build Args

  • API_VERSION
  • API_VERSION_URL_APPENDIX
  • GIT_BRANCH
  • GIT_COMMIT
  • GIT_TAG
  • APP_NAME
  • IMAGE_NAME

Running

Required env vars

  • DB_NAME
  • DB_PORT_CONTAINER
  • DB_PW
  • DB_USER
  • FLOWKIT_UI_URL
  • CONTAINER_NAME_DB
  • SERVER_PORT_HOST
  • AUTH0_DOMAIN
  • AUTH0_CLIENT_ID
  • AUTH0_CLIENT_SECRET
  • AUTH0_AUDIENCE

Optional env vars

  • DEV_MODE (default 0, set to 1 to enable)
  • LOG_LEVEL (default to warning, default to debug if DEV_MODE=1)
  • JUPYTER_ENABLED (default 0, set to 1 if using jupyter locally)
  • JUPYTER_PORT