Skip to content

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

    Create Your Dockerfile

    Create a Dockerfile in your repository:

    FROM python:3.11-slim
    # Install system dependencies
    RUN apt-get update && apt-get install -y \
    git \
    postgresql-client \
    libpq-dev \
    gcc \
    && rm -rf /var/lib/apt/lists/*
    # Create app directory
    WORKDIR /app
    # Clone RELATE
    RUN git clone https://github.com/inducer/relate.git .
    # Install Python dependencies
    RUN pip install --no-cache-dir -r requirements.txt
    RUN pip install gunicorn psycopg2-binary
    # Environment configuration
    ENV DJANGO_SETTINGS_MODULE=relate.settings
    ENV PORT=8000
    # Collect static files
    RUN python manage.py collectstatic --noinput
    EXPOSE 8000
    # Start with gunicorn
    CMD ["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:

    • Select HTTP as the traffic type
    • Set the internal port to 8000

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    DATABASE_URLpostgres://user:password@host:5432/relate
    SECRET_KEYA secure random string
    ALLOWED_HOSTSyour-app-name.klutch.sh
    DEBUGFalse
    EMAIL_HOSTYour SMTP server (optional)

    Attach Persistent Volumes

    Add persistent storage:

    Mount PathRecommended SizePurpose
    /app/media20 GBUploaded files and submissions
    /app/course-repos10 GBCourse content repositories

    Deploy Your Application

    Click Deploy to build and start your RELATE instance.

    Initial Setup

    Run database migrations and create an admin user:

    1. Access the deployment logs
    2. Use the admin interface to configure courses

Course Setup

Creating a Course

  1. Log in as an administrator
  2. Create a new course with a unique identifier
  3. Link a Git repository containing course content
  4. Configure enrollment and grading policies
  5. Invite students and teaching assistants

Course Content Format

RELATE uses YAML-based content files stored in Git:

type: Page
id: welcome
title: Welcome to the Course
content: |
# 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.