erseco / alpine-moodle

Moodle docker image based on Alpine Linux
https://hub.docker.com/r/erseco/alpine-moodle
MIT License
44 stars 34 forks source link

Enhancements to alpine-moodle Container for Better Management and Reverse Proxy Support #54

Closed erseco closed 1 year ago

erseco commented 1 year ago

This PR introduces several enhancements to the Alpine-Moodle container to provide easier management and reverse proxy support. The changes include the addition of management scripts for enrolling users and updating settings, an optimization of the startup script, and automatic updating of information in the container when variables are changed. The specific details of the improvements are:

  1. Reverse Proxy Support:

    • An option to configure a reverse proxy has been added, allowing the container to operate correctly behind a reverse proxy.
  2. Management Scripts:

    • A enrol.php script has been added that allows enrolling users in courses by specifying the username, course ID, and role.
    • A function has been added in the startup script to update the username, password, and email of the Moodle admin user.
  3. Startup Script Optimization:

    • The startup script has been reorganized to encapsulate logic into functions, making the script easier to read and maintain.
    • Error checking has been added to ensure necessary values are provided in the command line of the enrol.php script.
  4. Automatic Reflection of Variable Changes:

    • Now, if variables are changed in the script, the information will be reflected in the container on the next startup without the need for additional steps.

Testing Instructions:

Documentation Impact: