This repo is the configuration for building a Wearables Data Sharing Platform using FastAPI, Docker, and Postgres.
- pgAdmin UI - 127.0.0.1:5050
- API documentation - 127.0.0.1:8008/docs
app
- python code which serves the APIdocker_compose.sh
- a script to build and start the docker imagedocker_test_api.sh
- a curl script to test the API once the container is runningdocker-compose.yml
- config file for building docker imageDockerfile
- docker image build instructionsREADME.md
- this file. a general overview of this apprequirements.txt
- required python libraries
- build and start the docker image by running
sh docker_compose.sh
- test the API by running
sh docker_test_api.sh
- open a terminal or shell and type
docker ps
- copy the container id for
postgres:13-alpine
- type
docker inspect <container_id>
- copy
IPAddress
undernetworks
(e.g. 172.18.0.2) - paste in pgAdmin connection section under "add a server"
- enter fastapi_traefik as maintenance db, username, and password
- Open pgAdmin via web browser
- Tools > Storage Manager > Upload (icon)
Note: To increase file upload capacity, go to File > Storage > Options within pgAdmin UI
- Select the wearables database
- Use Tools -> Import/Export data to upload binary (.bin), comma separated values (.csv), or text files (.txt)
- Columns to import must match by order of table
Refer to this link for more information on upstream images