An e-learning platform. Organise modules, courses and subjects with dynamic content between video and text.
Basic requirements
- Docker
- Docker Compose
The development environment uses SQLite for the database and includes hot-reload functionality.
- Copy the example environment file (optional):
cp .env.dev.example .env- Build and start the development containers:
docker-compose -f docker-compose.dev.yml up --build-
Access the application at
http://localhost:8000 -
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)
- Username:
-
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
-
To run management commands:
docker-compose -f docker-compose.dev.yml exec web python manage.py <command>- To manually populate/re-populate sample courses:
docker-compose -f docker-compose.dev.yml exec web python manage.py populate_courses- To stop the containers:
docker-compose -f docker-compose.dev.yml downThe production environment uses PostgreSQL database and uWSGI server.
- Create your environment file:
cp .env.example .env-
Edit
.envand update the following critical variables:SECRET_KEY: Generate a secure random keyDATABASE_PASSWORD: Set a strong database passwordPOSTGRES_PASSWORD: Must match DATABASE_PASSWORDALLOWED_HOSTS: Set your domain names
-
Build and start the production containers:
docker-compose up --build -d-
The application will be available at
http://localhost:8000 -
To view logs:
docker-compose logs -f web- To run management commands:
docker-compose exec web python manage.py <command>- To create a superuser:
docker-compose exec web python manage.py createsuperuser- To stop the containers:
docker-compose down- To stop and remove all data (including database):
docker-compose down -vProduction Notes:
- Generate a secure
SECRET_KEY(use Django'sget_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
Basic requirements
- memcached
Install project python requirements and migrate the server
pip install -r requirements.txt
python manage.py migrateStart memcache on a different terminal
memcached -l 127.0.0.1:11211Run the project and access the components on 127.0.0.1:8000
python manage.py runserver