bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.31k stars 4.79k forks source link

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

Closed ThomasRasmussen closed 2 months ago

ThomasRasmussen commented 3 months ago

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.

carrodher commented 3 months ago

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!

github-actions[bot] commented 2 months ago

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] commented 2 months ago

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.