Skip to content

Installation

Simon Chester edited this page Mar 10, 2024 · 35 revisions

Installation instructions

For Mac OS / Linux

  1. Clone this repo (e.g. to ~/docker-dev)
  2. Create a directory that you can clone your Totara sites into (mkdir ~/totara-sites)
  3. 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)
  4. In the docker folder copy the .env.dist file to .env (cp .env.dist .env)
  5. 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)
  6. 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)
  7. Add the bin/ folder to your paths (e.g. PATH=$PATH:/path/to/docker-dev/bin)
  8. Run the tools/set_hosts.sh script from this repo 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)

Windows

We recommend to install Docker-dev within a WSL2 environment.

  1. Install WSL2 (e.g. with Ubuntu)
  2. Install Docker and Docker Compose within your WSL2 distribution
  3. Follow step 1 - 7 as described in the previous section, needs to be done within your WSL2 Ubuntu terminal/filesystem
  4. Configure your terminal to use an extended font pack (full font list available here)
  5. Edit your hosts file in Windows and add the hosts you'd like to use for accessing docker-dev (e.e. totara74 totara74.debug totara74.behat)

Set up your IDE (e.g. PhpStorm)

In PhpStorm, you can directly open a project stored in the WSL file system and work with it like with any other project.

Click Open on the Welcome screen or select File | Open from the main menu.

In the Select Path dialog that opens, select the folder in the WSL file system that contains the project to open, or type the path to the \wsl$ project location manually.

Clone this wiki locally