ccpgames/focusgrouplogs-frontend

Name: focusgrouplogs-frontend

Owner: CCP Games

Description: Python Flask frontend powering https://focusgrouplogs.tech.ccp.is/

Created: 2016-01-26 15:16:28.0

Updated: 2018-05-08 18:02:41.0

Pushed: 2018-05-08 18:02:40.0

Homepage: null

Size: 33

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Focus Group Logs Flask frontend

To build

docker build -t focusgrouplogs .

To run
er run -d --name=focusgrouplogs \
CLOUD_DATASET_ID="your-google-project-ID" \
OOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json" \
data/focusgrouplogs:/data \
080:8080 \
sgrouplogs
Caching

Setting the FOCUSGROUPLOGS_REDIS env var to “1” will enable redis caching. By default it will use “redis:6379/0” for a host and database. Use the FOCUSGROUPLOGS_REDIS_URL env var to change that to suit your needs.

If you want to use redis caching in dev, run the following before your start your frontend container

er run -d --name=focusgrouplogs-redis \
379:6379 \
s:latest

Also be sure to add --link=focusgrouplogs-redis:redis to your run args for the frontend container.

Debugging

To debug this container for local dev work, add the command /venv/bin/python /app/focusgrouplogs/web.py to your docker run command. This will run flask in debug, you can find the PIN via docker logs focusgrouplogs.

The future

Need to come up with a better way to show all logs from a group. Probably do some fancy infinite loading page, make a JSON response for the group/date routes.

Get involved!

See something off? Something that can be improved? Fork and send a pull request!


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.