-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
180 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.dockerignore | ||
__pycache__ | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.Python | ||
env | ||
venv* | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
.tox | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
*.log | ||
.git | ||
*.template | ||
.env* | ||
fake-s3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
TOOL_TITLE=Faculty Tools | ||
THEME_DIR= | ||
API_URL=https://example.com/ | ||
SECRET_KEY=CHANGEME | ||
LTI_KEY=CHANGEME | ||
LTI_SECRET=CHANGEME | ||
OAUTH2_URI=https://127.0.0.1:9001/oauthlogin | ||
OAUTH2_ID=CHANGEME | ||
OAUTH2_KEY=CHANGEME | ||
GOOGLE_ANALYTICS=GA-000000 | ||
CONFIG=config.DevelopmentConfig | ||
DATABASE_URI=mysql://root:secret@db/faculty_tools | ||
|
||
REQUIREMENTS=test_requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# config/settings | ||
logs | ||
settings.py | ||
whitelist.json | ||
.env | ||
|
||
# local theming | ||
themes/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM tiangolo/uwsgi-nginx-flask:python3.7 | ||
ARG REQUIREMENTS | ||
RUN apt-get update && apt-get -y install libffi-dev gcc python3-dev libffi-dev libssl-dev libxml2-dev libxmlsec1-dev libxmlsec1-openssl | ||
RUN apt-get -y install ca-certificates | ||
WORKDIR /app | ||
COPY requirements.txt /app/ | ||
COPY test_requirements.txt /app/ | ||
RUN echo $REQUIREMENTS | ||
RUN pip install -r $REQUIREMENTS | ||
COPY ./ /app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: '3.1' | ||
|
||
services: | ||
lti: | ||
build: | ||
context: . | ||
args: | ||
- "REQUIREMENTS=${REQUIREMENTS}" | ||
ports: | ||
- "9001:80" | ||
env_file: | ||
- .env | ||
environment: | ||
- MODULE_NAME=app | ||
depends_on: | ||
- db | ||
|
||
db: | ||
image: mysql:5.7 | ||
volumes: | ||
- ft_dbdata:/var/lib/mysql | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: secret | ||
MYSQL_DATABASE: faculty_tools | ||
MYSQL_USER: root | ||
MYSQL_PASSWORD: secret | ||
ports: | ||
- "33061:3306" | ||
volumes: | ||
ft_dbdata: {} | ||
|
||
|
||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
canvasapi==0.15.0 | ||
Flask==1.1.1 | ||
Flask-SQLAlchemy==2.4.1 | ||
Flask-SQLAlchemy==2.5.1 | ||
mysqlclient | ||
-e git+https://github.com/ucfcdl/pylti.git@roles#egg=PyLTI | ||
git+https://github.com/ucfcdl/pylti.git@roles#egg=PyLTI | ||
requests==2.22.0 | ||
Werkzeug>=1.0.1 # Chrome 80 SameSite fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import os | ||
# Title of the tool. Appears in the <title> element, headers, and configuration XML | ||
TOOL_TITLE = os.environ.get("TOOL_TITLE", "Faculty Tools") | ||
|
||
# Which theme directory to use. Leave blank for default. | ||
THEME_DIR = os.environ.get("THEME_DIR", "") | ||
|
||
# Canvas instance URL. ex: https://example.instructure.com/ | ||
BASE_URL = os.environ.get("API_URL") | ||
API_URL = BASE_URL + "api/v1/" | ||
|
||
# Secret key to sign Flask sessions with. KEEP THIS SECRET! | ||
secret_key = os.environ.get("SECRET_KEY") | ||
|
||
# LTI consumer key and shared secret | ||
CONSUMER_KEY = os.environ.get("LTI_KEY") | ||
SHARED_SECRET = os.environ.get("LTI_SECRET") | ||
|
||
# Configuration for pylti library. Uses the above key and secret | ||
PYLTI_CONFIG = { | ||
"consumers": { | ||
CONSUMER_KEY: { | ||
"secret": SHARED_SECRET | ||
} | ||
}, | ||
# Custom configurable roles | ||
"roles": { | ||
"staff": [ | ||
"urn:lti:instrole:ims/lis/Administrator", | ||
"Instructor", | ||
"ContentDeveloper", | ||
"urn:lti:role:ims/lis/TeachingAssistant", | ||
] | ||
}, | ||
} | ||
|
||
# The "Oauth2 Redirect URI" that you provided to Instructure. | ||
oauth2_uri = os.environ.get("OAUTH2_URI") # ex. 'https://localhost:5000/oauthlogin' | ||
# The Client_ID Instructure gave you | ||
oauth2_id = os.environ.get("OAUTH2_ID") | ||
# The Secret Instructure gave you | ||
oauth2_key = os.environ.get("OAUTH2_KEY") | ||
|
||
# Logging configuration | ||
LOG_MAX_BYTES = 1024 * 1024 * 5 # 5 MB | ||
LOG_BACKUP_COUNT = 2 | ||
ERROR_LOG = "logs/faculty-tools.log" | ||
|
||
whitelist = "whitelist.json" | ||
|
||
# Google Analytics Tracking ID (optional) | ||
GOOGLE_ANALYTICS = os.environ.get("GOOGLE_ANALYTICS", "GA-") | ||
|
||
|
||
configClass = os.environ.get("CONFIG", "config.DevelopmentConfig") |