phpmyadmin / docker

Docker container for phpMyAdmin
https://hub.docker.com/_/phpmyadmin
GNU General Public License v3.0
665 stars 456 forks source link

Add PMA_USER_FILE to the environment variable [docker secrets] #372

Closed DEL-TRONIK closed 2 years ago

DEL-TRONIK commented 2 years ago

I think it could be a good idea to integrate the variable PMA_USER_FILE to the environment variable ?

Because if I use the variable in my MariaDB container, I cannot use it in the phpMyAdmin container, So I have to modify the password in two different places or use a global variable instead of using secrets ..

it's possible ?

services:
  mariadb:
    build:
      context: .
    environment:
      MYSQL_DATABASE_FILE: /run/secrets/mariadb-database
      MYSQL_USER_FILE: /run/secrets/mariadb-user
      MYSQL_PASSWORD_FILE: /run/secrets/mariadb-password
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mariadb-root-password
    secrets:
      - mariadb-database
      - mariadb-user
      - mariadb-password
      - mariadb-root-password
  phpmyadmin:
    build:
      context: .
    environment:
      PMA_HOST: mariadb
      PMA_USER: my_username
      PMA_PASSWORD_FILE: /run/secrets/mariadb-password
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mariadb-root-password
    secrets:
      - mariadb-password
      - mariadb-root-password
williamdes commented 2 years ago

Hi @DEL-TRONIK This looks like a good idea.

I think we can add:

williamdes commented 2 years ago

This will be live on the next phpMyAdmin version