Added optional environment variable JOOMLA_DB_PASSWORD_FILE (#100)

This environment variable is crucial for Docker secrets, as Docker secrets can only be files mounted to a specific path. Without support for reading the password out of a file, we are forced to define the database password in the docker-compose file which is not very secure.
This commit is contained in:
John Karabudak 2020-08-11 15:43:41 -02:30 committed by GitHub
parent 1b6c56e9b6
commit b8876399f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@
set -e
if [[ -f "$JOOMLA_DB_PASSWORD_FILE" ]]; then
JOOMLA_DB_PASSWORD=$(cat "$JOOMLA_DB_PASSWORD_FILE")
fi
if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
if [ -n "$MYSQL_PORT_3306_TCP" ]; then
if [ -z "$JOOMLA_DB_HOST" ]; then