Deploying RELATE
Introduction
RELATE (REsearch and Learning Applied to Teaching Environments) is an open-source course management system designed for interactive online learning, particularly in technical and scientific disciplines. Developed at the University of Illinois, RELATE supports automated grading, programming exercises, and flexible course content management.
Key features of RELATE include:
- Interactive Content: Create engaging course materials with embedded exercises
- Automated Grading: Support for auto-graded programming assignments
- Code Execution: Run student code safely in sandboxed environments
- Git-Based Content: Manage course materials through Git repositories
- Flexible Assessments: Multiple question types and grading rubrics
- Analytics Dashboard: Track student progress and performance
- Instant Feedback: Provide immediate feedback on submissions
- LTI Integration: Connect with learning management systems
- Multi-Course Support: Host multiple courses on one instance
This guide walks through deploying RELATE on Klutch.sh using Docker, configuring the database, and setting up your course management system.
Prerequisites
Before deploying RELATE on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your RELATE configuration
- A PostgreSQL database
- Basic familiarity with Docker and Python applications
Deploying RELATE on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8000
- Access the deployment logs
- Use the admin interface to configure courses
Create Your Dockerfile
Create a Dockerfile in your repository:
FROM python:3.11-slim
# Install system dependenciesRUN apt-get update && apt-get install -y \ git \ postgresql-client \ libpq-dev \ gcc \ && rm -rf /var/lib/apt/lists/*
# Create app directoryWORKDIR /app
# Clone RELATERUN git clone https://github.com/inducer/relate.git .
# Install Python dependenciesRUN pip install --no-cache-dir -r requirements.txtRUN pip install gunicorn psycopg2-binary
# Environment configurationENV DJANGO_SETTINGS_MODULE=relate.settingsENV PORT=8000
# Collect static filesRUN python manage.py collectstatic --noinput
EXPOSE 8000
# Start with gunicornCMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "relate.wsgi:application"]Push Your Repository to GitHub
Commit and push your Dockerfile to your GitHub repository.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “relate-lms”.
Create a New App
Create a new app within your project and connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
DATABASE_URL | postgres://user:password@host:5432/relate |
SECRET_KEY | A secure random string |
ALLOWED_HOSTS | your-app-name.klutch.sh |
DEBUG | False |
EMAIL_HOST | Your SMTP server (optional) |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/media | 20 GB | Uploaded files and submissions |
/app/course-repos | 10 GB | Course content repositories |
Deploy Your Application
Click Deploy to build and start your RELATE instance.
Initial Setup
Run database migrations and create an admin user:
Course Setup
Creating a Course
- Log in as an administrator
- Create a new course with a unique identifier
- Link a Git repository containing course content
- Configure enrollment and grading policies
- Invite students and teaching assistants
Course Content Format
RELATE uses YAML-based content files stored in Git:
type: Pageid: welcometitle: Welcome to the Coursecontent: | # Welcome
This is an interactive course page.
[Continue to first lesson](flow:lesson1)Additional Resources
Conclusion
Deploying RELATE on Klutch.sh provides a powerful course management system with automatic builds, persistent storage, and secure HTTPS access. Create interactive courses with automated grading, particularly suited for technical and programming education.