Skip to content

kine-dmd/api

Repository files navigation

Kine-DMD API Build Status

Go API for deployment to AWS ECS and for local running on server. Used to match data sent directly a watch with a universally unique identifier to a patient ID and transmit the data onwards for processing. image

AWS ECS

The API is primarily designed to be run on AWS ECS. To this effect, it is designed to be stateless to allow for multiple containers to be run in parallel. ecsContainers

Local run

The API can also be run on a local server. When this is done, the API will initialise a different watch database and data writer on start up. image

To run the container, the below folder structure must first be established with folders created manually for each patient. Failure to create folders for user data will result in API errors. In addition, the users CSV file and appropriate public and private keys for the web server must be initialised as follows:

image

Once this is done, tag the built container as kine-dmd-api and run the following command. This maps the folders outside the container to folders inside the container and uses the docker daemon to restart the container if it crashes or the underlying OS is rebooted. It also runs the process in the background so a user can safely exit their session whilst leaving the API running.

docker run -p 0.0.0.0:3000:443 -e "kine_dmd_api_location=local" -v $PWD/certs/:/certs -v $PWD/watch_db/:/watch_db -v $PWD/data:/data --restart always -d kine-dmd-api

About

Go API for the AWS server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published