Name: mpower_api
Owner: University of Washington Clinical Informatics Research Group
Description: A simplified FHIR-based backend API application using the mPOWEr data model.
Created: 2017-11-07 01:33:21.0
Updated: 2017-12-22 17:55:30.0
Pushed: 2018-01-11 00:23:27.0
Homepage: null
Size: 91
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A simplified FHIR-based backend API application using the mPOWEr data model.
(see https://docs.docker.com/compose/gettingstarted/)
Install Docker and Docker compose.
Clone project into desired working directory:
clone https://github.com/uwcirg/mpower_api.git
Build and run the containers
power_api
er-compose build
er-compose up -d
Navigate to http://localhost:5000/hello. You should get an Welcome to mPOWEr!
message.
The database is created using the initdb.sql
file in the /db/sql/
directory. The database container uses the volume mpowerapi-db
for database data. It also maps a
2nd volume for initializing the database, which only happens if the main volume does not exist yet (I think).
The database container also exposes the mysql port (3306) as port 6603 externally.
To (1) re-create the db, (2) re-load it with data from initdb.sql, and (3) connect to it from the host machine (command-line mysql client or workbench):
power_api
er-compose down -v
er-compose up -d --build db
l -u root -p root -h localhost -P 6603
docker-compose down
removes all related volumes, networks, and containers, so we start at a clean slate.
docker-compose up -d --build db
builds and starts only the db container.
Common commands:
project_dir>
-build and re-start containers, including db init:
er-compose down -v
er-compose up -d --build
ndows-specific: Ensures container is notified of changes by Host inside volume
n this command in PowerShell
e: https://github.com/merofeev/docker-windows-volume-watcher
t-Process -NoNewWindow docker-volume-watcher mysite
art interactive shell connected to dev container
er exec -it mpower-app bash
n flask shell inside interactive shell
ask shell