This directory contains sample Docker Compose configurations for deploying eXeLearning with different database backends.
- PostgreSQL: docker-compose.postgres.yml
- MariaDB: docker-compose.mariadb.yml
- SQLite: docker-compose.sqlite.yml (simplest option)
-
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
-
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
-
Access the application at http://localhost:8080 (or the port specified in your APP_PORT variable)
You can customize the deployment by setting these environment 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 stylesONLINE_IDEVICES_INSTALL: Allow users to import/install iDevices
-
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
All configurations use Docker volumes for data persistence:
- PostgreSQL:
postgres-datavolume for database files - MariaDB:
mariadb-datavolume for database files - SQLite:
exelearning-datavolume for the SQLite database file and application files
For production deployments:
- Set a strong
APP_SECRETvalue - Change all default passwords
- Consider setting up a backup strategy for your volumes
- For high-traffic sites, consider using PostgreSQL or MariaDB instead of SQLite