This repository is a demonstration of using a Mixture of Dirichlet-Multinomial Mixtures for role discovery on Piazza courses.
git clone https://github.com/skystrife/piazza-roles.git
cd piazza-roles
git submodule update --init --recursive
You will need to create two .env
files to set environment variables
properly:
Here you should set the environment variables for the Postgres database container:
POSTGRES_USER=nonrootuseryouwanttouse
POSTGRES_PASSWORD=passwordtoconnecttodb
Here you should set the environment variables for the Flask application container:
SECRET_KEY=somespecialsecret
FLASK_ENV=(development|production)
SQLALCHEMY_DATABASE_URI="postgresql://POSTGRESUSERHERE@POSTGRESPASSWORDHERE@postgres:5432/POSTGRESUSERHERE"
SQLALCHEMY_TRACK_MODIFICATIONS=false
CELERY_BROKER_URL="redis://redis:6379/0"
CELERY_RESULT_BACKEND="redis://redis:6379/0"
SOCKETIO_MESSAGE_QUEUE="redis://redis"
# Build containers:
sudo docker-compose build
# Run containers:
sudo docker-compose up
# Bootstrap the db while the app is running:
sudo docker-compose exec web pipenv run flask db upgrade