Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ThomasRasmussen opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels
moodle solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@ThomasRasmussen
Copy link

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 ThomasRasmussen added the tech-issues The user has a technical issue about an application label Jun 25, 2024
@github-actions github-actions bot added the triage Triage is needed label Jun 25, 2024
ThomasRasmussen added a commit to ThomasRasmussen/bitnami-containers that referenced this issue Jun 25, 2024
to connect to database bitnami#68054

Signed-off-by: Thomas Lønskov Luther <rasmussen.thomas@gmail.com>
ThomasRasmussen added a commit to ThomasRasmussen/bitnami-containers that referenced this issue Jun 25, 2024
Change sql-mysql.sh script to use default moodle environment variables
to connect to database bitnami#68054

Signed-off-by: Thomas Lønskov Luther <rasmussen.thomas@gmail.com>
@carrodher
Copy link
Member

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!

Copy link

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 github-actions bot added the stale 15 days without activity label Jul 11, 2024
Copy link

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.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moodle solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
4 participants