mirror of
https://github.com/joomla-docker/docker-joomla.git
synced 2025-01-24 15:48:27 +00:00
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:
parent
1b6c56e9b6
commit
b8876399f8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user