Skip to content

Conversation

NeillM
Copy link
Contributor

@NeillM NeillM commented Dec 10, 2024

Before this change the moodle-app was always put onto port 8100, this makes it impossible (without using local.yml) to have multiple instances of moodle-docker running if they also have a copy of the app running.

After this change while be default nothing should change you may now select the exposed port, or disable it altogether using MOODLE_DOCKER_APP_PORT

Before this change MOODLE_DOCKER_APP_PORT was used internally to select the source port for the app, this is now done using MOODLE_DOCKER_APP_INTERNAL_PORT because that name fits better with the other environment variables that let the user set the port available on the host.

@NeillM
Copy link
Contributor Author

NeillM commented Dec 10, 2024

I ran this both on Linux and Windows using docker images for the app:

  • No MOODLE_DOCKER_APP_PORT to check that the app was started on port 8100 as before these changes
  • MOODLE_DOCKER_APP_PORT set to 0 to check no mapping happened
  • MOODLE_DOCKER_APP_PORT set to a port other than 8100 to check that was picked up

@NeillM
Copy link
Contributor Author

NeillM commented Dec 10, 2024

One of the unit tests failed... since I did not change any Moodle code I'm not sure that is related to this change.

Before this change the moodle-app was always put onto port 8100, this makes it impossible to
have multiple instances of moodle-docker running if they also have a copy of the app running.

After this change while be default nothing should change you may now select the exposed port,
or disable it altogether using MOODLE_DOCKER_APP_PORT

Before this change MOODLE_DOCKER_APP_PORT was used internally to select the source port for
the app, this is now done using MOODLE_DOCKER_APP_INTERNAL_PORT because that name fits better
with the other environment variables that let the user set the port available on the host.
@NeillM NeillM force-pushed the allow-app-port-config branch from d7179ba to ad6f36f Compare September 19, 2025 14:25
@NeillM
Copy link
Contributor Author

NeillM commented Sep 19, 2025

I have rebased the change and fixed the conflict.

@NeillM
Copy link
Contributor Author

NeillM commented Sep 19, 2025

The Moodle 3.9 failure seems to be something to do with the absence of composer, rather than something to do with this change.

Run export MOODLE_DOCKER_DB="pgsql"
Running: bin/moodle-docker-compose exec -T webserver vendor/bin/phpunit --filter core_dml_testcase
You need to set up the project dependencies using Composer:

    composer install

You can learn all about Composer on [https://getcomposer.org/.](https://getcomposer.org/)
Error: Process completed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant