Skip to content
Derschatta edited this page Aug 31, 2023 · 33 revisions

Requirements

Linux

Note: For Ubuntu/Debian users, you can use this easy script to install everything in one go.

  1. Docker Engine
  2. Docker Compose

MacOS

  1. Docker Desktop
  2. Mutagen (install extension for better performance)

Windows

  1. Docker Desktop
  2. Mutagen (install extension for better performance)

or alternatively:

  1. Windows Terminal (Optional, but recommended)
  2. Ubuntu for WSL2
  3. Linux GUI app support for WSL & GWSL (Requires Windows 11 - this is required for integrating with PHPStorm)
  4. Docker Engine and Docker Compose (installed within Ubuntu for WSL2)

Installation

Note: On Windows, these next steps will need to be done within your WSL2 Ubuntu terminal/filesystem

  1. Create a directory that you can clone your Totara sites into (mkdir ~/totara-sites)
  2. Clone the Totara source code (For Totara employees, see our BitBucket repository) into your site folder and give it a name (e.g. cd ~/totara-sites && git clone REPO_URL totara13)
  3. Copy the .env.dist file to .env (cp .env.dist .env)
  4. Within the copied .env, set LOCAL_SRC to be the full path to your local Totara site folder (e.g. LOCAL_SRC=/home/USERNAME/totara-sites)
  5. Copy the config.php file from this repo into your Totara site repo folder (or alternatively create a config.php based upon config.example.php/config.php.dist in the site root)
  6. Add the bin/ folder to your paths (e.g. PATH=$PATH:/path/to/docker-dev/bin)
  7. Windows Only: In an elevated Windows command prompt, run icacls C:\Windows\System32\drivers\etc\hosts /grant Users:W (required for the next step)
  8. Run the tools/set_hosts.sh script to add all the required host entries to your /etc/hosts file
  9. Configure your terminal to use an extended font pack (full font list available here)
  10. MacOS Only: Set up Mutagen to improve performance (recommended)

Usage

See the Usage page for usage documentation.