Skip to content

Commit

Permalink
Add & enable production MFEs on production
Browse files Browse the repository at this point in the history
We have openedx running behind proxy on production. Caddyfile patches
in already existing home & course_about MFEs have `header_up
X-Forwarded-Port 80` which might be causing issues in Google Chrome.
  • Loading branch information
snglth committed Oct 9, 2023
1 parent ccaff8c commit 3103986
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ansible/host_vars/community_theme/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ tutor_post_hooks:
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins enable forum"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins enable cairn"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins enable learner-dashboard-mfe"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins disable home-mfe"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins disable course-about-mfe"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins enable home-mfe-production"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} plugins enable course-about-mfe-production"
- "{{ tutor_venv_path }}/{{ tutor_exec_name }} config save"


13 changes: 13 additions & 0 deletions plugins/course-about-mfe-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: course-about-mfe-production
version: 0.1.0
patches:
caddyfile-lms: |
route /courses/*/about {
reverse_proxy "mfe:8002" {
rewrite /course_about/{uri}
}
}
route /course_about/* {
reverse_proxy "mfe:8002"
}
13 changes: 13 additions & 0 deletions plugins/home-mfe-procution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: home-mfe-production
version: 0.1.0
patches:
caddyfile-lms: |
route / {
reverse_proxy "mfe:8002" {
rewrite /home/{uri}
}
}
route /home/* {
reverse_proxy "mfe:8002"
}

0 comments on commit 3103986

Please sign in to comment.