ugoviti / izpbx

izPBX is a Turnkey Cloud Native Telephony System powered by Asterisk Engine and FreePBX Management GUI
GNU General Public License v3.0
179 stars 74 forks source link

Add function to read MYSQL passwords from secret files generated with 'docker secret' or 'podman secret' #60

Closed hobbit378 closed 8 months ago

hobbit378 commented 9 months ago

Add function in 'izpbx-asterisk\rootfs\entrypoint-hooks.sh' to read MYSQL passwords from secret files generated with 'docker secret' or 'podman secret' and mounted in '/run/secrets' c.f. https://docs.docker.com/engine/swarm/secrets/

ugoviti commented 8 months ago

Hi, i'm testing it, do you confirm that works only when in docker swarm mode? docker compose doesn't recognise the external secret

anyway I committed right now the latest changes, please check it and report if I'm wrong.

review the updated code and changelog and let me know is something doesn't worsk as expected

Thankyou!

hobbit378 commented 8 months ago

Hi, i'm testing it, do you confirm that works only when in docker swarm mode? docker compose doesn't recognise the external secret

Should also work with docker compose , c.f. offical documentation https://docs.docker.com/compose/use-secrets/ , and c.f. https://docs.docker.com/compose/compose-file/09-secrets/ , but I ahve not tested this as I configured izpbx to run with podman as systemd service (using 'podman run --secret' option, c.f. https://docs.podman.io/en/latest/markdown/podman-run.1.html. Used this feature there for already quite a while and so far without any problems.

Greetings, Matthias