dsteinkopf / backup-all-mysql

Docker image to do automatic backups of a mysql DB.
https://nerdblog.steinkopf.net/2017/04/backup-all-mysql-docker-image-fuer-einfaches-backup/
GNU General Public License v2.0
14 stars 8 forks source link

allow getting MYSQL_ROOT_PASSWORD from a secrets #3

Closed thib3113 closed 5 years ago

dsteinkopf commented 5 years ago

Thank you very much - looks nice. Would you like to add a sentence of explanation and maybe an example to the readme.md? That would be great.

thib3113 commented 5 years ago

ok, no problems, I'll do this when accessing a computer .

in the same time, why using an env : MYSQL_ENV_MYSQL_ROOT_PASSWORD , and not only MYSQL_ROOT_PASSWORD ? is this env name special ?

and why are you using set -x ( it break the "secrets" by logging it 😂 )

dsteinkopf commented 5 years ago

fine!

To answer your questions:

MYSQL_ENV_MYSQL_ROOT_PASSWORD is a special env var for linked containers - but deprecated (if I googled correctly see here). I am not quite sure if we should change it to MYSQL_ROOT_PASSWORD. Maybe some if to provide backward compatibility for some time.

In my "quick and dirty scipts" I am using set -x as as poor man's logging. And since this script started as (and still is) a bit quick and dirty and I like logging for debugging in case of an error, this "logging" is still there. But you're right - from security point of view we should remove it. If you like, go on and add some explicit log lines and remove the set -x.

Don't hesitate to make changes in this and/or other PRs - I'll appreciate it.