moodle-docker icon indicating copy to clipboard operation
moodle-docker copied to clipboard

Moodle app should not be automatically exposed on a fixed port

Open NeillM opened this issue 5 months ago • 0 comments

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:

  1. You cannot run multiple instances of moodle-docker that include the app at the same time
  2. 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.

NeillM avatar Aug 27 '24 09:08 NeillM