Skip to content

An e-learning platform. Organise modules, courses and subjects with dynamic content between video and text.

Notifications You must be signed in to change notification settings

MarvinKweyu/masomo

Repository files navigation

masomo

Masomo

An e-learning platform. Organise modules, courses and subjects with dynamic content between video and text.

Table of Contents

Setting up masomo

Docker (Recommended)

Basic requirements

  • Docker
  • Docker Compose

Development Setup

The development environment uses SQLite for the database and includes hot-reload functionality.

  1. Copy the example environment file (optional):
cp .env.dev.example .env
  1. Build and start the development containers:
docker-compose -f docker-compose.dev.yml up --build
  1. Access the application at http://localhost:8000

  2. Default user accounts (created automatically):

    Admin Account:

    • Username: admin
    • Password: admin
    • Email: admin@masomo.com
    • Role: Administrator (can manage courses)

    Student Account:

    • Username: student
    • Password: student
    • Email: student@masomo.com
    • Role: Student (enrolled in all courses)
  3. Sample Data: The development environment automatically populates the database with 5 Computer Science courses:

    • Full Stack Web Development with Django
    • Python for Data Science and Analytics
    • Machine Learning Fundamentals
    • Computer Networks and Security
    • Database Design and SQL
  4. To run management commands:

docker-compose -f docker-compose.dev.yml exec web python manage.py <command>
  1. To manually populate/re-populate sample courses:
docker-compose -f docker-compose.dev.yml exec web python manage.py populate_courses
  1. To stop the containers:
docker-compose -f docker-compose.dev.yml down

Production Setup

The production environment uses PostgreSQL database and uWSGI server.

  1. Create your environment file:
cp .env.example .env
  1. Edit .env and update the following critical variables:

    • SECRET_KEY: Generate a secure random key
    • DATABASE_PASSWORD: Set a strong database password
    • POSTGRES_PASSWORD: Must match DATABASE_PASSWORD
    • ALLOWED_HOSTS: Set your domain names
  2. Build and start the production containers:

docker-compose up --build -d
  1. The application will be available at http://localhost:8000

  2. To view logs:

docker-compose logs -f web
  1. To run management commands:
docker-compose exec web python manage.py <command>
  1. To create a superuser:
docker-compose exec web python manage.py createsuperuser
  1. To stop the containers:
docker-compose down
  1. To stop and remove all data (including database):
docker-compose down -v

Production Notes:

  • Generate a secure SECRET_KEY (use Django's get_random_secret_key())
  • For production deployment, add a reverse proxy (nginx/traefik) in front of the application
  • Consider using Docker secrets or a secrets management service for sensitive data

Manual Setup

Basic requirements

  • memcached

Install project python requirements and migrate the server

pip install -r requirements.txt
python manage.py migrate

Start memcache on a different terminal

memcached -l 127.0.0.1:11211

Run the project and access the components on 127.0.0.1:8000

python manage.py runserver

About

An e-learning platform. Organise modules, courses and subjects with dynamic content between video and text.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors