[bitnami/moodle] sql-script in post-init.d should use exising database environment variables
Name and Version
bitnami/moodle:4.4.1
What architecture are you using?
None
What steps will reproduce the bug?
- Use the docker-compose.yaml within the git repo
- Create a simple sql script and place it in a directory that docker can reach
- Change so that the directory used before is mounted in /docker-entrypoint.d/
- Start the containers using the docker-compose up
What is the expected behavior?
The SQL script is applied to the moodle database
What do you see instead?
An error stating that mysql command could not succeeed.
Additional information
If the sql-mysql.sh script in /post-init.d/ used the MOODLE_DATABASE variables defined in the docker-compose.yaml file, then it was able to connect to the database using the same credentials as Moodle would connect to the database. I would assume that the changes one would make, is limitied to the database that was initialized for moodle. I use it for applying configuration during init instead of having to click-ops them for the installation of moodle.
Thank you for opening this issue and submitting the associated Pull Request. Our team will review and provide feedback. Once the PR is merged, the issue will automatically close.
Your contribution is greatly appreciated!
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.