Skip to content

Latest commit

 

History

History
88 lines (65 loc) · 3.07 KB

File metadata and controls

88 lines (65 loc) · 3.07 KB

eXeLearning Deployment Configurations

This directory contains sample Docker Compose configurations for deploying eXeLearning with different database backends.

Available Configurations

How to Use

  1. Create a deployment directory and copy the desired configuration file:

    # Create a deployment directory
    mkdir -p deploy
    cd deploy
    
    # Copy the desired configuration file
    # For PostgreSQL
    curl -L https://raw.githubusercontent.com/exelearning/exelearning/main/doc/deploy/docker-compose.postgres.yml -o docker-compose.yml
    
    # For MariaDB
    curl -L https://raw.githubusercontent.com/exelearning/exelearning/main/doc/deploy/docker-compose.mariadb.yml -o docker-compose.yml
    
    # For SQLite
    curl -L https://raw.githubusercontent.com/exelearning/exelearning/main/doc/deploy/docker-compose.sqlite.yml -o docker-compose.yml
  2. Start the application:

    # Set required environment variables (or use defaults)
    export APP_PORT=8080
    export APP_SECRET=YourSecretKey
    export DB_NAME=exelearning
    export DB_USER=exelearning
    export DB_PASSWORD=secure_password
    
    # Start the containers
    docker compose up
  3. Access the application at http://localhost:8080 (or the port specified in your APP_PORT variable)

Environment Variables

You can customize the deployment by setting these environment variables:

Common Variables

  • APP_PORT: Port to access the application (default: 8080)
  • APP_SECRET: Secret key for JWT authentication (required for production)
  • ADMIN_EMAIL, ADMIN_PASSWORD: Admin user credentials (created/updated when ADMIN_PASSWORD is set)
  • ONLINE_THEMES_INSTALL: Allow users to import/install styles
  • ONLINE_IDEVICES_INSTALL: Allow users to import/install iDevices

Database-Specific Variables

  • PostgreSQL:

    • DB_NAME: Database name (default: exelearning)
    • DB_USER: Database user (default: postgres)
    • DB_PASSWORD: Database password (default: postgres)
    • DB_PORT: Database port (default: 5432)
  • MariaDB:

    • DB_NAME: Database name (default: exelearning)
    • DB_USER: Database user (default: exelearning)
    • DB_PASSWORD: Database password (default: exelearning)
    • DB_PORT: Database port (default: 3306)
    • MARIADB_ROOT_PASSWORD: Root password (default: root)
  • SQLite:

    • No specific variables required

Data Persistence

All configurations use Docker volumes for data persistence:

  • PostgreSQL: postgres-data volume for database files
  • MariaDB: mariadb-data volume for database files
  • SQLite: exelearning-data volume for the SQLite database file and application files

Production Deployment Notes

For production deployments:

  1. Set a strong APP_SECRET value
  2. Change all default passwords
  3. Consider setting up a backup strategy for your volumes
  4. For high-traffic sites, consider using PostgreSQL or MariaDB instead of SQLite