Skip to content

Commit d020fe6

Browse files
committed
chore: update tutor config for mfe-demo image
1 parent a961a0d commit d020fe6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+6531
-0
lines changed
Lines changed: 314 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,314 @@
1+
# Global configuration
2+
{
3+
4+
5+
# Enable proxying from all servers by default. Otherwise, X-Forwarded-* headers will
6+
# be overwritten.
7+
# https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults
8+
servers {
9+
trusted_proxies static 0.0.0.0/0 ::/0
10+
}
11+
12+
13+
}
14+
15+
# proxy directive snippet (with logging) to be used as follows:
16+
#
17+
# import proxy "containername:port"
18+
(proxy) {
19+
log {
20+
output stdout
21+
format filter {
22+
wrap json
23+
fields {
24+
common_log delete
25+
request>headers delete
26+
resp_headers delete
27+
tls delete
28+
}
29+
}
30+
}
31+
32+
# This will compress requests that matches the default criteria set by Caddy.
33+
# see https://caddyserver.com/docs/caddyfile/directives/encode
34+
# for information about the defaults; i.e. how/when this will be applied.
35+
encode gzip
36+
37+
reverse_proxy {args.0} {
38+
header_up X-Forwarded-Port 443
39+
}
40+
41+
42+
}
43+
44+
mfe-demo.phd.opencraft.hosting{$default_site_port}, preview.mfe-demo.phd.opencraft.hosting{$default_site_port} {
45+
@favicon_matcher {
46+
path_regexp ^/favicon.ico$
47+
}
48+
rewrite @favicon_matcher /theming/asset/images/favicon.ico
49+
50+
# Limit profile image upload size
51+
handle_path /api/profile_images/*/*/upload {
52+
request_body {
53+
max_size 1MB
54+
}
55+
}
56+
57+
import proxy "lms:8000"
58+
59+
60+
@mfe_authn {
61+
path /authn /authn/*
62+
}
63+
handle @mfe_authn {
64+
redir /authn /authn/
65+
reverse_proxy mfe:8002 {
66+
header_up Host {host}
67+
}
68+
}
69+
@mfe_account {
70+
path /account /account/*
71+
}
72+
handle @mfe_account {
73+
redir /account /account/
74+
handle /account/settings {
75+
reverse_proxy lms:8000
76+
}
77+
handle /account/password {
78+
reverse_proxy lms:8000
79+
}
80+
handle /account/finish_auth {
81+
reverse_proxy lms:8000
82+
}
83+
reverse_proxy mfe:8002 {
84+
header_up Host {host}
85+
}
86+
}
87+
@mfe_communications {
88+
path /communications /communications/*
89+
}
90+
handle @mfe_communications {
91+
redir /communications /communications/
92+
reverse_proxy mfe:8002 {
93+
header_up Host {host}
94+
}
95+
}
96+
@mfe_discussions {
97+
path /discussions /discussions/*
98+
}
99+
handle @mfe_discussions {
100+
redir /discussions /discussions/
101+
reverse_proxy mfe:8002 {
102+
header_up Host {host}
103+
}
104+
}
105+
@mfe_gradebook {
106+
path /gradebook /gradebook/*
107+
}
108+
handle @mfe_gradebook {
109+
redir /gradebook /gradebook/
110+
reverse_proxy mfe:8002 {
111+
header_up Host {host}
112+
}
113+
}
114+
@mfe_learner-dashboard {
115+
path /learner-dashboard /learner-dashboard/*
116+
}
117+
handle @mfe_learner-dashboard {
118+
redir /learner-dashboard /learner-dashboard/
119+
reverse_proxy mfe:8002 {
120+
header_up Host {host}
121+
}
122+
}
123+
@mfe_learning {
124+
path /learning /learning/*
125+
}
126+
handle @mfe_learning {
127+
redir /learning /learning/
128+
reverse_proxy mfe:8002 {
129+
header_up Host {host}
130+
}
131+
}
132+
@mfe_ora-grading {
133+
path /ora-grading /ora-grading/*
134+
}
135+
handle @mfe_ora-grading {
136+
redir /ora-grading /ora-grading/
137+
reverse_proxy mfe:8002 {
138+
header_up Host {host}
139+
}
140+
}
141+
@mfe_profile {
142+
path /profile /profile/*
143+
}
144+
handle @mfe_profile {
145+
redir /profile /profile/
146+
reverse_proxy mfe:8002 {
147+
header_up Host {host}
148+
}
149+
}
150+
151+
152+
handle_path /* {
153+
request_body {
154+
max_size 4MB
155+
}
156+
}
157+
}
158+
159+
studio.mfe-demo.phd.opencraft.hosting{$default_site_port} {
160+
@favicon_matcher {
161+
path_regexp ^/favicon.ico$
162+
}
163+
rewrite @favicon_matcher /theming/asset/images/favicon.ico
164+
165+
import proxy "cms:8000"
166+
167+
168+
reverse_proxy /api/mfe_config/v1* lms:8000 {
169+
header_up Host mfe-demo.phd.opencraft.hosting
170+
}
171+
@authoring path_regexp authoring /course-authoring/(.*)
172+
redir @authoring /authoring/{re.authoring.1} permanent
173+
@mfe_authoring {
174+
path /authoring /authoring/*
175+
}
176+
handle @mfe_authoring {
177+
redir /authoring /authoring/
178+
reverse_proxy mfe:8002 {
179+
header_up Host {host}
180+
}
181+
}
182+
183+
184+
handle_path /* {
185+
request_body {
186+
max_size 250MB
187+
}
188+
}
189+
}
190+
191+
192+
meilisearch.mfe-demo.phd.opencraft.hosting{$default_site_port} {
193+
import proxy "meilisearch:7700"
194+
}
195+
196+
197+
apps.mfe-demo.phd.opencraft.hosting{$default_site_port} {
198+
redir / https://mfe-demo.phd.opencraft.hosting
199+
request_body {
200+
max_size 2MB
201+
}
202+
import proxy "mfe:8002"
203+
}
204+
{$default_site_port} {
205+
@favicon_matcher {
206+
path_regexp ^/favicon.ico$
207+
}
208+
rewrite @favicon_matcher /theming/asset/images/favicon.ico
209+
210+
211+
@mfe_authn {
212+
path /authn /authn/*
213+
}
214+
handle @mfe_authn {
215+
redir /authn /authn/
216+
reverse_proxy mfe:8002 {
217+
header_up Host {host}
218+
}
219+
}
220+
@mfe_account {
221+
path /account /account/*
222+
}
223+
handle @mfe_account {
224+
redir /account /account/
225+
handle /account/settings {
226+
reverse_proxy lms:8000
227+
}
228+
handle /account/password {
229+
reverse_proxy lms:8000
230+
}
231+
handle /account/finish_auth {
232+
reverse_proxy lms:8000
233+
}
234+
reverse_proxy mfe:8002 {
235+
header_up Host {host}
236+
}
237+
}
238+
@mfe_communications {
239+
path /communications /communications/*
240+
}
241+
handle @mfe_communications {
242+
redir /communications /communications/
243+
reverse_proxy mfe:8002 {
244+
header_up Host {host}
245+
}
246+
}
247+
@mfe_discussions {
248+
path /discussions /discussions/*
249+
}
250+
handle @mfe_discussions {
251+
redir /discussions /discussions/
252+
reverse_proxy mfe:8002 {
253+
header_up Host {host}
254+
}
255+
}
256+
@mfe_gradebook {
257+
path /gradebook /gradebook/*
258+
}
259+
handle @mfe_gradebook {
260+
redir /gradebook /gradebook/
261+
reverse_proxy mfe:8002 {
262+
header_up Host {host}
263+
}
264+
}
265+
@mfe_learner-dashboard {
266+
path /learner-dashboard /learner-dashboard/*
267+
}
268+
handle @mfe_learner-dashboard {
269+
redir /learner-dashboard /learner-dashboard/
270+
reverse_proxy mfe:8002 {
271+
header_up Host {host}
272+
}
273+
}
274+
@mfe_learning {
275+
path /learning /learning/*
276+
}
277+
handle @mfe_learning {
278+
redir /learning /learning/
279+
reverse_proxy mfe:8002 {
280+
header_up Host {host}
281+
}
282+
}
283+
@mfe_ora-grading {
284+
path /ora-grading /ora-grading/*
285+
}
286+
handle @mfe_ora-grading {
287+
redir /ora-grading /ora-grading/
288+
reverse_proxy mfe:8002 {
289+
header_up Host {host}
290+
}
291+
}
292+
@mfe_profile {
293+
path /profile /profile/*
294+
}
295+
handle @mfe_profile {
296+
redir /profile /profile/
297+
reverse_proxy mfe:8002 {
298+
header_up Host {host}
299+
}
300+
}
301+
302+
# Limit profile image upload size
303+
request_body /api/profile_images/*/*/upload {
304+
max_size 1MB
305+
}
306+
request_body {
307+
max_size 4MB
308+
}
309+
import proxy "lms:8000"
310+
311+
312+
313+
}
314+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
SITE_NAME: "studio.mfe-demo.phd.opencraft.hosting"
2+
BOOK_URL: ""
3+
LOG_DIR: "/openedx/data/logs"
4+
LOGGING_ENV: "sandbox"
5+
OAUTH_OIDC_ISSUER: "https://mfe-demo.phd.opencraft.hosting/oauth2"
6+
PLATFORM_NAME: "Picasso Harmony Drydock Experimentation"
7+
FEATURES:
8+
9+
10+
CERTIFICATES_HTML_VIEW: true
11+
PREVIEW_LMS_BASE: "preview.mfe-demo.phd.opencraft.hosting"
12+
ENABLE_CSMH_EXTENDED: false
13+
ENABLE_LEARNER_RECORDS: false
14+
ENABLE_LIBRARY_INDEX: true
15+
MILESTONES_APP: true
16+
ENABLE_PREREQUISITE_COURSES: true
17+
LMS_ROOT_URL: "https://mfe-demo.phd.opencraft.hosting"
18+
CMS_ROOT_URL: "https://studio.mfe-demo.phd.opencraft.hosting"
19+
CMS_BASE: "studio.mfe-demo.phd.opencraft.hosting"
20+
LMS_BASE: "mfe-demo.phd.opencraft.hosting"
21+
CONTACT_EMAIL: "contact@mfe-demo.phd.opencraft.hosting"
22+
CELERY_BROKER_TRANSPORT: "redis"
23+
CELERY_BROKER_HOSTNAME: "redis:6379"
24+
CELERY_BROKER_VHOST: "0"
25+
CELERY_BROKER_USER: ""
26+
CELERY_BROKER_PASSWORD: ""
27+
ALTERNATE_WORKER_QUEUES: "lms"
28+
ENABLE_COMPREHENSIVE_THEMING: true
29+
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
30+
EMAIL_HOST: "smtp"
31+
EMAIL_PORT: 8025
32+
EMAIL_USE_TLS: false
33+
HTTPS: "on"
34+
LANGUAGE_CODE: "en"
35+
SESSION_COOKIE_DOMAIN: "studio.mfe-demo.phd.opencraft.hosting"
36+
37+
DEFAULT_SITE_THEME: "bragi"
38+
39+
40+
SECRET_KEY: "r2OtbXCVM6cRnlUxibPsJF2i"
41+
AWS_ACCESS_KEY_ID: ""
42+
AWS_SECRET_ACCESS_KEY: ""
43+
DOC_STORE_CONFIG: null
44+
XQUEUE_INTERFACE:
45+
django_auth: null
46+
url: null
47+
DATABASES:
48+
default:
49+
ENGINE: "django.db.backends.mysql"
50+
HOST: "mysql"
51+
PORT: 3306
52+
NAME: "openedx"
53+
USER: "openedx"
54+
PASSWORD: "PxE7dq1l"
55+
ATOMIC_REQUESTS: true
56+
OPTIONS:
57+
init_command: "SET sql_mode='STRICT_TRANS_TABLES'"
58+
charset: "utf8mb4"
59+
EMAIL_HOST_USER: ""
60+
EMAIL_HOST_PASSWORD: ""

0 commit comments

Comments
 (0)