Skip to content

Commit fa2b2d9

Browse files
authored
Merge pull request #79 from jpahullo/issue-55
Allow multiple instances of Moodle simultaneously
2 parents 296465a + 8a179ab commit fa2b2d9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,27 @@ bin/moodle-docker-wait-for-db
3939
# Shut down and destroy containers
4040
bin/moodle-docker-compose down
4141
```
42+
## Run several Moodle instances
43+
44+
By default, the script will load a single instance. If you want to run two
45+
or more different versions of Moodle at the same time, you have to add this
46+
environment variable prior running any of the steps at `Quick start`:
47+
48+
```bash
49+
# Define a project name; it will appear as a prefix on container names.
50+
export COMPOSE_PROJECT_NAME=moodle34
51+
52+
# Use a different public web port from those already taken
53+
export MOODLE_DOCKER_WEB_PORT=1234
54+
55+
# [..] run all "Quick steps" now
56+
```
57+
58+
Having set up several Moodle instances, you need to have set up
59+
the environment variable `COMPOSE_PROJECT_NAME` to just refer
60+
to the instance you expect to. See
61+
[envvars](https://docs.docker.com/compose/reference/envvars/)
62+
to see more about `docker-compose` environment variables.
4263

4364
## Use containers for running behat tests
4465

0 commit comments

Comments
 (0)