Skip to main content

Prerequisites

Before installing Luna, ensure you have the following installed:
  • Python 3.9+
  • Docker and Docker Compose
  • PostgreSQL (for local development without Docker)
  • Git

Dependencies

Core Packages

Additional Dependencies

Installation Methods

Step 1: Clone Repository

Step 2: Configure Environment Variables

Create a .env file in the project root:

Step 3: Build and Start Services

This will start:
  • Web Application (Port 80 → 8000)
  • PostgreSQL Database (Port 5432)
  • pgAdmin (Port 8001)

Step 4: Run Database Migrations

Step 5: Create Superuser

Follow prompts to enter:
  • Email address
  • First name
  • Last name
  • Password

Step 6: Initialize University Data

Access PostgreSQL and create initial university:
Or use external tools (DBeaver, pgAdmin) with:
  • Host: localhost
  • Port: 5432
  • Database: postgres
  • Username: (from .env PGUSER)
  • Password: (from .env PGPASSWORD)

Step 7: Access Application

Method 2: Local Python Installation

Step 1: Clone and Setup Virtual Environment

Step 2: Install Dependencies

Step 3: Configure Environment

Create .env file:

Step 4: Setup PostgreSQL Database

Step 5: Run Migrations

Step 6: Start Development Server

Access at: http://localhost:8000

Docker Service Management

View Logs

Container Access

Restart Services

Stop Services

Database Setup Details

Docker Compose Configuration

The docker-compose.yml defines three services:

Dockerfile Overview

The application uses Python 3.9 base image and:
  1. Installs Python dependencies from requirements.txt
  2. Installs system utilities (cron)
  3. Copies application code
  4. Sets up entrypoint script for initialization
  5. Exposes port 8000

Entrypoint Process

The entrypoint.sh script:
  1. Waits for PostgreSQL to be ready
  2. Runs database migrations
  3. Starts cron for scheduled tasks
  4. Starts Django development server
  5. Executes django-cron jobs every 12 hours

Verification Steps

1. Check Running Containers

Expected output:

2. Verify Database Connection

3. Check Migrations

4. Access Admin Panel

Navigate to http://localhost/admin and login with superuser credentials.

Troubleshooting

Port Conflicts

If ports 80, 5432, or 8001 are in use, modify docker-compose.yml:

Database Connection Issues

  1. Ensure PostgreSQL container is running:
  2. Check environment variables in .env
  3. Verify database logs:

Migration Errors

Permission Issues

Next Steps

After successful installation:
  1. Configure Modules - Create university modules via admin panel
  2. Add Users - Register students and lecturers
  3. Create Surveys - Design forms for data collection
  4. Review Architecture - See Architecture Guide
  5. Understand Workflows - See Student Experience and Lecturer Experience

Production Deployment

For production deployment on AWS EC2 with Nginx:
  1. Use production-ready database (RDS or managed PostgreSQL)
  2. Configure Nginx as reverse proxy
  3. Set DEBUG=False in environment
  4. Use proper SSL certificates
  5. Configure allowed hosts
  6. Set up database backups
  7. Implement monitoring and logging

Support: For issues, consult project documentation or contact the development team.