containers icon indicating copy to clipboard operation
containers copied to clipboard

[bitnami/moodle] sql-script in post-init.d should use exising database environment variables

Open ThomasRasmussen opened this issue 1 year ago • 1 comments

Name and Version

bitnami/moodle:4.4.1

What architecture are you using?

None

What steps will reproduce the bug?

  1. Use the docker-compose.yaml within the git repo
  2. Create a simple sql script and place it in a directory that docker can reach
  3. Change so that the directory used before is mounted in /docker-entrypoint.d/
  4. 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.

ThomasRasmussen avatar Jun 25 '24 05:06 ThomasRasmussen

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!

carrodher avatar Jun 25 '24 16:06 carrodher

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.

github-actions[bot] avatar Jul 11 '24 01:07 github-actions[bot]

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.

github-actions[bot] avatar Jul 16 '24 01:07 github-actions[bot]