DO NOT MERGE: Add configurable course base domain and container support - #1095
Open
lgriffin wants to merge 1 commit into
Open
DO NOT MERGE: Add configurable course base domain and container support#1095lgriffin wants to merge 1 commit into
lgriffin wants to merge 1 commit into
Conversation
Replace hardcoded .netlify.app domain with a configurable PUBLIC_COURSE_BASE_DOMAIN env var, enabling courses to be served from any hosting provider (OpenShift, localhost, custom domains). Add Dockerfiles for both the reader and course containers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@lgriffin is attempting to deploy a commit to the Jordan Harrison Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE — Testing/Experimental
This PR is a proof of concept for deploying Tutors on Kubernetes/OpenShift. Not ready for production.
Summary
.netlify.appdomain in course URL resolution with a configurablePUBLIC_COURSE_BASE_DOMAINenvironment variable (defaults to.netlify.appfor backward compatibility)Dockerfilefor building the reader as a Node.js container (multi-stage build usingadapter-node)Dockerfile.courseas a sample nginx container for serving static course content with CORS headerssvelte.config.node.jsso container builds useadapter-nodewhile the repo default staysadapter-auto(Netlify unaffected)Architecture
Approach 1: Reader deployed centrally on OpenShift, courses served from configurable locations (other containers, student machines, or existing Netlify sites).
Files changed
src/lib/services/course/config.tsPUBLIC_COURSE_BASE_DOMAINwith fallbacksrc/lib/services/course/services/lo-tree.tsdetermineCourseUrl()accepts optionalbaseDomainparamsrc/lib/services/community/services/catalogue.ts.env.examplePUBLIC_COURSE_BASE_DOMAINDockerfileDockerfile.coursesvelte.config.node.js.dockerignorevitest.config.ts$env/static/publicin teststests/mocks/env-static-public.tsTest plan
determineCourseUrl()tests pass (backward compatible)npm run buildsucceeds🤖 Generated with Claude Code