-
Notifications
You must be signed in to change notification settings - Fork 32
Installation
Simon Chester edited this page Mar 10, 2024
·
35 revisions
- Clone this repo (e.g. to ~/docker-dev)
- Create a directory that you can clone your Totara sites into (
mkdir ~/totara-sites
) - 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
) - In the docker folder copy the
.env.dist
file to.env
(cp .env.dist .env
) - Within the copied
.env
, setLOCAL_SRC
to be the full path to your local Totara site folder (e.g.LOCAL_SRC=/home/USERNAME/totara-sites
) - Copy the
config.php
file from this repo into your Totara site repo folder (or alternatively create aconfig.php
based uponconfig.example.php
/config.php.dist
in the site root) - Add the
bin/
folder to your paths (e.g.PATH=$PATH:/path/to/docker-dev/bin
) - Run the
tools/set_hosts.sh
script from this repo to add all the required host entries to your/etc/hosts
file - Configure your terminal to use an extended font pack (full font list available here)
- MacOS Only: Set up Mutagen to improve performance (recommended)
We recommend to install Docker-dev within a WSL2 environment.
- Install WSL2 (e.g. with Ubuntu)
- Install Docker and Docker Compose within your WSL2 distribution
- Follow step 1 - 7 as described in the previous section, needs to be done within your WSL2 Ubuntu terminal/filesystem
- Configure your terminal to use an extended font pack (full font list available here)
-
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
)
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.
Copyright (c) 2023 Totara Learning Solutions Limited
- Node.js and Grunt
- PHPUnit
- Behat
- Cron
- Machine Learning
- Mailcatcher (for viewing emails)
- Shell Customisations
- Ngrok (for making your site publicly accessible)
-
PHPStorm Integration
- Performance improvements
- Automated testing integration
- XDebug setup
- Database tools