If using local dev enviornment:
-
Clone git clone https://github.com/ccnmtl/metricsmentor.git
cd metricsmentor -
Create the database Postgres:
- Create a database user/password (if needed)
- Create the database
createdb metricsmentor
-
Customize settings
-
Create a
local_settings.pyfile in themetricsmentorsubdirectory OR -
Copy
metricsmentor/settings_shared.pytometricsmentor/local_settings.py -
Then, override the variables from
settings_shared.pythat you need to customize for your local installation.- Customize your
DATABASEdictionary- e.g. set NAME, HOST, USER, and PASSWORD. remove PORT (unless it's non-standard)
- Specify ALLOWED_HOSTS = [ 'localhost', '.your.blackboard.or.moodle.domain', '.your.workstation.domain', ]
- Customize your
-
The
PYLTI_CONFIGvariable in yourlocal_settings.pyconfigures the application consumers and secrets. Generate two long random numbers for these values.PYLTI_CONFIG = { 'consumers': { '<random number string>': { 'secret': '<random number string>' } } }
-
-
Build the virtual environment
makewill build the virtualenv -
Migrate the database
./manage.py migrate -
Run
make devThis is equivalent to running Django's ./manage.py runserver in one shell and Webpack in another. The output from both will be printed to the shell. Use CTR-C to exit.
If using docker:
Run: docker compose up
If your Postgres is a docker instance:
Run: docker compose -f docker-compose-external-postgres.dev.yml up
Note: We have ran into situations where the node_modules aren’t being installed. You may need to run npm i inside of the root folder. Then run the docker compose command again.
Canvas
- https://community.canvaslms.com/docs/DOC-13117-415274482
- Note: the URL to enter in these steps will be
https://<app hostname>/lti/config.xml
- Note: the URL to enter in these steps will be