moodle-docker
moodle-docker copied to clipboard
Moodle app should not be automatically exposed on a fixed port
When Moodle docker includes the app it automatically exposes a fixed port of 8100 to it on the docker host machine.
This had a couple of issues:
- You cannot run multiple instances of moodle-docker that include the app at the same time
- If port 8100 is already in use by something else, the other service needs to be shutdown
This is especially problematic on an automatic testing server where you may want to run multiple instances of moodle-docker at the same time.
I think that by default a port to the app should not be exposed to the host machine, and that we should add a new environment variable that controls the host port that exposes the app if it is set.
The existing $MOODLE_DOCKER_APP_PORT controls which moodleapp port is mapped to port 8100 on the host, since it differs depending on if the docker image or the locally compiled version is used.