Skip to content

Conversation

@pigochu
Copy link
Contributor

@pigochu pigochu commented Mar 29, 2023

@ibennetch
Copy link
Member

Good idea

/etc/phpmyadmin/conf.d need to check whether  /etc/phpmyadmin/conf.d exists
Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, can you add some documentation on the README for that?

@williamdes
Copy link
Member

You may be interested to translate phpMyAdmin in your language: https://hosted.weblate.org/projects/phpmyadmin/5-2/th/

Did I get it right?

@pigochu
Copy link
Contributor Author

pigochu commented Mar 29, 2023

You may be interested to translate phpMyAdmin in your language: https://hosted.weblate.org/projects/phpmyadmin/5-2/th/

Did I get it right?
I am from Taiwan.
My English is not good.

@pigochu
Copy link
Contributor Author

pigochu commented Mar 29, 2023

Awesome, can you add some documentation on the README for that?
@williamdes

I use google translate to translate my thoughts into English, what do you think?


Adding Custom Configuration into /etc/phpmyadmin/conf.d

Instead of using /etc/phpmyadmin/config.user.inc.php, you can also consider storing your custom configuration files in /etc/phpmyadmin/conf.d, which is very suitable for managing multiple MySQL Container uses different file names to distinguish settings.

On the docker run line like this:

docker run --name phpmyadmin -d --link mysql_db_server:db -p 8080:80 -v /some/local/directory/conf.d:/etc/phpmyadmin/conf.d phpmyadmin:latest

Then you can create db1.php , db2.php , or any file name you want, and store them in the conf.d directory on the host.

@williamdes
Copy link
Member

I use google translate to translate my thoughts into English, what do you think?

Okay, It's doing well. Do you speak other languages ?


You can change the line from

- /some/local/directory/conf.d:/etc/phpmyadmin/conf.d
+ /some/local/directory/conf.d:/etc/phpmyadmin/conf.d:ro

To make the mount read-only.

you can also consider storing your custom configuration files in /etc/phpmyadmin/conf.d

you can also consider storing your custom configuration files in the folder /etc/phpmyadmin/conf.d

which is very suitable for managing multiple MySQL Container

which is very suitable for managing multiple phpMyAdmin configuration files for different hosts

Then you can create db1.php , db2.php , or any file name you want, and store them in the conf.d directory on the host.

Then you can create server-1.php , server-2.php , or any file name you want, and store them in the conf.d directory mounted on the host.

@pigochu
Copy link
Contributor Author

pigochu commented Mar 29, 2023

Okay, It's doing well. Do you speak other languages ?

Sorry, I only speak Chinese and poor English

@williamdes
Copy link
Member

Sorry, I only speak Chinese and poor English

Okay, if you are interested (no obligation at all) you can help with translations in Chinese:

@williamdes
Copy link
Member

let me know when it's okay for the README. I can improve it while I merge your work

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One line you could add is about permissions, the folder and files should be readable from the phpMyAdmin container. Or it will not work at all.

@pigochu
Copy link
Contributor Author

pigochu commented Mar 29, 2023

One line you could add is about permissions, the folder and files should be readable from the phpMyAdmin container. Or it will not work at all.

I have a question, is it necessary to use ro?
In fact, I have another project that wants to automatically discovers mysql service and automatically modify or add the files in conf.d . So I need write permission.

@williamdes
Copy link
Member

I have a question, is it necessary to use ro?
In fact, I have another project that wants to automatically discovers mysql service and automatically modify or add the files in conf.d . So I need write permission.

From a security point of view, it's better to say to the user we do not need write access. If you need write access, feel free to use rw or nothing :)

@williamdes williamdes changed the title Support additional configurations Support adding custom configurations in /etc/phpmyadmin/conf.d Jun 29, 2023
@williamdes williamdes self-assigned this Jun 29, 2023
williamdes added a commit that referenced this pull request Jun 29, 2023
@williamdes williamdes merged commit adf9118 into phpmyadmin:master Jun 29, 2023
ederuiter pushed a commit to ederuiter/docker that referenced this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants