forked from eduNEXT/drydock
-
Notifications
You must be signed in to change notification settings - Fork 0
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
15 changed files
with
272 additions
and
1 deletion.
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
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,33 @@ | ||
{% if DRYDOCK_ENABLE_MULTITENANCY -%} | ||
{$default_site_port} { | ||
@favicon_matcher { | ||
path_regexp ^/favicon.ico$ | ||
} | ||
rewrite @favicon_matcher /theming/asset/images/favicon.ico | ||
|
||
# Limit profile image upload size | ||
request_body /api/profile_images/*/*/upload { | ||
max_size 1MB | ||
} | ||
request_body { | ||
max_size 4MB | ||
} | ||
import proxy "lms:8000" | ||
{% if DRYDOCK_ENABLE_SCORM -%} | ||
@scorm_matcher { | ||
path /scorm-proxy/* | ||
} | ||
route @scorm_matcher { | ||
uri /scorm-proxy/* strip_prefix /scorm-proxy | ||
{% if MINIO_HOST is defined %} | ||
reverse_proxy minio:9000 { | ||
header_up Host {{ MINIO_HOST }} | ||
{% else %} | ||
reverse_proxy https://{{ S3_STORAGE_BUCKET }}.s3.amazonaws.com { | ||
header_up Host {{ S3_STORAGE_BUCKET }}.s3.amazonaws.com | ||
{% endif %} | ||
} | ||
} | ||
{% endif %} | ||
} | ||
{% endif %} |
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,17 @@ | ||
{% if DRYDOCK_ENABLE_SCORM -%} | ||
@scorm_matcher { | ||
path /scorm-proxy/* | ||
} | ||
route @scorm_matcher { | ||
{% if MINIO_HOST is defined %} | ||
uri replace /scorm-proxy/ /{{ MINIO_BUCKET_NAME }}/ | ||
reverse_proxy minio:9000 { | ||
header_up Host {{ MINIO_HOST }} | ||
{% else %} | ||
uri /scorm-proxy/* strip_prefix /scorm-proxy | ||
reverse_proxy https://{{ S3_STORAGE_BUCKET }}.s3.amazonaws.com { | ||
header_up Host {{ S3_STORAGE_BUCKET }}.s3.amazonaws.com | ||
{% endif %} | ||
} | ||
} | ||
{% endif %} |
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,17 @@ | ||
{% if DRYDOCK_ENABLE_SCORM -%} | ||
@scorm_matcher { | ||
path /scorm-proxy/* | ||
} | ||
route @scorm_matcher { | ||
{% if MINIO_HOST is defined %} | ||
uri replace /scorm-proxy/ /{{ MINIO_BUCKET_NAME }}/ | ||
reverse_proxy minio:9000 { | ||
header_up Host {{ MINIO_HOST }} | ||
{% else %} | ||
uri /scorm-proxy/* strip_prefix /scorm-proxy | ||
reverse_proxy https://{{ S3_STORAGE_BUCKET }}.s3.amazonaws.com { | ||
header_up Host {{ S3_STORAGE_BUCKET }}.s3.amazonaws.com | ||
{% endif %} | ||
} | ||
} | ||
{% endif %} |
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,25 @@ | ||
{% if DRYDOCK_ENABLE_CELERY_TUNING -%} | ||
CELERY_ACKS_LATE: true | ||
{% endif %} | ||
{% if DRYDOCK_ENABLE_SENTRY -%} | ||
# eox plugin settings must be defined in the ENV patches. If defined in python settings patches, they won't | ||
# take effect since plugins settings are loaded before Tutor loads its settings. | ||
EOX_CORE_SENTRY_INTEGRATION_DSN: "{{ DRYDOCK_SENTRY_DSN }}" | ||
EOX_CORE_SENTRY_IGNORED_ERRORS: [ | ||
{ | ||
"exc_class": "xmodule.exceptions.NotFoundError" | ||
}, | ||
{ | ||
"exc_class": "openedx.core.djangoapps.user_authn.exceptions.AuthFailedError", | ||
"exc_text": [".*Email or password is incorrect"] | ||
}, | ||
{ | ||
"exc_class": "opaque_keys.InvalidKeyError", | ||
"exc_text": [".*No enrollment found for user.*"] | ||
}, | ||
{ | ||
"exc_class": "opaque_keys.NotFoundError", | ||
"exc_text": [".*No course found by course id.*"] | ||
}, | ||
] | ||
{% endif %} |
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,22 @@ | ||
{% if DRYDOCK_ENABLE_CELERY_TUNING -%} | ||
CELERY_ACKS_LATE: true | ||
{% endif %} | ||
{% if DRYDOCK_ENABLE_SENTRY -%} | ||
# eox plugin settings must be defined in the ENV patches. If defined in python settings patches, they won't | ||
# take effect since plugins settings are loaded before Tutor loads its settings. | ||
EOX_CORE_SENTRY_INTEGRATION_DSN: "{{ DRYDOCK_SENTRY_DSN }}" | ||
EOX_CORE_SENTRY_IGNORED_ERRORS: [ | ||
{ | ||
"exc_class": "openedx.core.djangoapps.user_authn.exceptions.AuthFailedError", | ||
"exc_text": ["AuthFailedError.*Email or password is incorrect"] | ||
}, | ||
{ | ||
"exc_class": "opaque_keys.InvalidKeyError", | ||
"exc_text": [".*No enrollment found for user.*"] | ||
}, | ||
{ | ||
"exc_class": "opaque_keys.NotFoundError", | ||
"exc_text": [".*No course found by course id.*"] | ||
}, | ||
] | ||
{% endif %} |
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,20 @@ | ||
{% if DRYDOCK_ENABLE_SCORM -%} | ||
# SCORM SETTINGS | ||
def scorm_xblock_storage(xblock): | ||
from django.conf import settings | ||
from storages.backends.s3boto3 import S3Boto3Storage | ||
if SERVICE_VARIANT == "lms": | ||
domain = settings.LMS_BASE | ||
else: | ||
domain = settings.CMS_BASE | ||
return S3Boto3Storage( | ||
bucket=AWS_STORAGE_BUCKET_NAME, | ||
access_key=AWS_ACCESS_KEY_ID, | ||
secret_key=AWS_SECRET_ACCESS_KEY, | ||
querystring_expire=86400, | ||
custom_domain=f"{domain}/scorm-proxy" | ||
) | ||
XBLOCK_SETTINGS["ScormXBlock"] = { | ||
"STORAGE_FUNC": scorm_xblock_storage, | ||
} | ||
{% endif %} |
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,20 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cms-worker | ||
spec: | ||
template: | ||
spec: | ||
terminationGracePeriodSeconds: 300 | ||
containers: | ||
- name: cms-worker | ||
args: | ||
- celery | ||
- --app=cms.celery | ||
- worker | ||
- --loglevel=info | ||
- --concurrency=1 | ||
- --hostname=edx.cms.core.default.%%h | ||
- --max-tasks-per-child=1 | ||
- --prefetch-multiplier=1 | ||
- --exclude-queues=edx.lms.core.default |
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,20 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: lms-worker | ||
spec: | ||
template: | ||
spec: | ||
terminationGracePeriodSeconds: 300 | ||
containers: | ||
- name: lms-worker | ||
args: | ||
- celery | ||
- --app=lms.celery | ||
- worker | ||
- --loglevel=info | ||
- --concurrency=1 | ||
- --hostname=edx.lms.core.default.%%h | ||
- --max-tasks-per-child=1 | ||
- --prefetch-multiplier=1 | ||
- --exclude-queues=edx.cms.core.default |
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,14 @@ | ||
{% if FORUM_DOCKER_IMAGE is defined -%} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: forum | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: forum | ||
env: | ||
- name: MONGOID_AUTH_SOURCE | ||
value: "{{ FORUM_MONGODB_DATABASE }}" | ||
{% endif -%} |
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,27 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cms | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: cms | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: | ||
- "sleep" | ||
- "30" | ||
startupProbe: | ||
httpGet: | ||
httpHeaders: | ||
- name: Host | ||
value: {{ CMS_HOST }} | ||
path: /heartbeat | ||
port: 8000 | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 3 | ||
periodSeconds: 5 | ||
failureThreshold: 5 | ||
terminationGracePeriodSeconds: 60 |
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,27 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: lms | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: lms | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: | ||
- "sleep" | ||
- "30" | ||
startupProbe: | ||
httpGet: | ||
httpHeaders: | ||
- name: Host | ||
value: {{ LMS_HOST }} | ||
path: /heartbeat | ||
port: 8000 | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 3 | ||
periodSeconds: 5 | ||
failureThreshold: 5 | ||
terminationGracePeriodSeconds: 60 |