Skip to content
/ pfmdb Public

A FastAPI interface to pfmongo, API endpoints mirror pfmongo CLI groups and subgroups

Notifications You must be signed in to change notification settings

FNNDSC/pfmdb

Repository files navigation

pfmdb

Build

a FastAPI REST service that provides web-based interfaces to a mongo server using pfmongo

Abstract

pfmdb is a FastAPI application that provides REST services accessing a mongo server using pfmongo approaches (i.e. a flat shadow collection for faster searching and hashing added to each json document in a collection).

pfmdb Specificities

pfmdb is bundled with mongo express in addition to mongo, providing another web-based view into the mongo server. The pfmdb API reflects the command subgroup structure of pfmongo.

pfmdb Deployment

local build

To build a local version, clone this repo and then

docker-compose up

The FastAPI service is listening on :8025 with swagger at :8025/docs.

dockerhub

To use the version available on dockerhub (note, might not be available at time of reading):

docker pull fnndsc/pfmdb

running

To start the services

SESSIONUSER=localuser
docker run --gpus all --privileged          \
        --env SESSIONUSER=$SESSIONUSER      \
        --name pfmdb --rm -it -d             \
        -p 2024:2024                        \
        local/pfmdb /start-reload.sh

To start with source code debugging and live refreshing:

SESSIONUSER=localuser
docker run --gpus all --privileged          \
        --env SESSIONUSER=$SESSIONUSER      \
        --name pfmdb --rm -it -d             \
        -p 2024:2024                        \
        -v $PWD/pfmdb:/app:ro
        local/pfmdb /start-reload.sh

(note if you pulled from dockerhub, use fnndsc/pfmdb instead of local/pfmdb)

-30-

About

A FastAPI interface to pfmongo, API endpoints mirror pfmongo CLI groups and subgroups

Resources

Stars

Watchers

Forks

Packages