Skip to content

Commit

Permalink
Added variable for root user. Removed DB root from web images
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Feb 26, 2022
1 parent bd65b3c commit 37f90e7
Show file tree
Hide file tree
Showing 53 changed files with 112 additions and 401 deletions.
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -162,7 +163,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -162,7 +163,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -162,7 +163,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -162,7 +163,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/proxy-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -162,7 +163,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/server-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -157,7 +158,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/server-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -157,7 +158,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/server-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -157,7 +158,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/server-mysql/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -157,7 +158,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/server-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ check_variables_mysql() {
file_env MYSQL_USER
file_env MYSQL_PASSWORD

file_env MYSQL_ROOT_USER
file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
Expand All @@ -157,7 +158,7 @@ check_variables_mysql() {

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_USER=${MYSQL_ROOT_USER:-"root"}
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

Expand Down
2 changes: 0 additions & 2 deletions Dockerfiles/web-apache-mysql/alpine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ printf "zabbix" | docker secret create MYSQL_PASSWORD -
docker run --name some-zabbix-web-apache-mysql -e DB_SERVER_HOST="some-mysql-server" -e MYSQL_USER_FILE=/run/secrets/MYSQL_USER -e MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD -e ZBX_SERVER_HOST="some-zabbix-server" -e PHP_TZ="some-timezone" -d zabbix/zabbix-web-apache-mysql:tag
```

This method is also applicable for `MYSQL_ROOT_PASSWORD` with `MYSQL_ROOT_PASSWORD_FILE`.

By default, values for `MYSQL_USER` and `MYSQL_PASSWORD` are `zabbix`, `zabbix`.

### `MYSQL_DATABASE`
Expand Down
32 changes: 3 additions & 29 deletions Dockerfiles/web-apache-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,10 @@ file_env() {
check_variables() {
: ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"}
USE_DB_ROOT_USER=false
CREATE_ZBX_DB_USER=false

file_env MYSQL_USER
file_env MYSQL_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
echo "**** Impossible to use MySQL server because of unknown Zabbix user and random 'root' password"
exit 1
fi

if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" != "true" ]; then
echo "*** Impossible to use MySQL server because 'root' password is not defined and it is not empty"
exit 1
fi

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true

# If root password is not specified use provided credentials
: ${DB_SERVER_ROOT_USER:=${MYSQL_USER}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
DB_SERVER_ZBX_USER=${MYSQL_USER:-"zabbix"}
DB_SERVER_ZBX_PASS=${MYSQL_PASSWORD:-"zabbix"}

Expand Down Expand Up @@ -119,10 +97,6 @@ check_db_connect() {
echo "* DB_SERVER_PORT: ${DB_SERVER_PORT}"
echo "* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}"
if [ "${DEBUG_MODE,,}" == "true" ]; then
if [ "${USE_DB_ROOT_USER}" == "true" ]; then
echo "* DB_SERVER_ROOT_USER: ${DB_SERVER_ROOT_USER}"
echo "* DB_SERVER_ROOT_PASS: ${DB_SERVER_ROOT_PASS}"
fi
echo "* DB_SERVER_ZBX_USER: ${DB_SERVER_ZBX_USER}"
echo "* DB_SERVER_ZBX_PASS: ${DB_SERVER_ZBX_PASS}"
fi
Expand All @@ -132,9 +106,9 @@ check_db_connect() {

ssl_opts="$(db_tls_params)"

export MYSQL_PWD="${DB_SERVER_ROOT_PASS}"
export MYSQL_PWD="${DB_SERVER_ZBX_PASS}"

while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \
while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ZBX_PASS} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
sleep $WAIT_TIMEOUT
Expand Down
2 changes: 0 additions & 2 deletions Dockerfiles/web-apache-mysql/centos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ printf "zabbix" | docker secret create MYSQL_PASSWORD -
docker run --name some-zabbix-web-apache-mysql -e DB_SERVER_HOST="some-mysql-server" -e MYSQL_USER_FILE=/run/secrets/MYSQL_USER -e MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD -e ZBX_SERVER_HOST="some-zabbix-server" -e PHP_TZ="some-timezone" -d zabbix/zabbix-web-apache-mysql:tag
```

This method is also applicable for `MYSQL_ROOT_PASSWORD` with `MYSQL_ROOT_PASSWORD_FILE`.

By default, values for `MYSQL_USER` and `MYSQL_PASSWORD` are `zabbix`, `zabbix`.

### `MYSQL_DATABASE`
Expand Down
32 changes: 3 additions & 29 deletions Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,10 @@ file_env() {
check_variables() {
: ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"}
USE_DB_ROOT_USER=false
CREATE_ZBX_DB_USER=false

file_env MYSQL_USER
file_env MYSQL_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
echo "**** Impossible to use MySQL server because of unknown Zabbix user and random 'root' password"
exit 1
fi

if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" != "true" ]; then
echo "*** Impossible to use MySQL server because 'root' password is not defined and it is not empty"
exit 1
fi

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true

# If root password is not specified use provided credentials
: ${DB_SERVER_ROOT_USER:=${MYSQL_USER}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
DB_SERVER_ZBX_USER=${MYSQL_USER:-"zabbix"}
DB_SERVER_ZBX_PASS=${MYSQL_PASSWORD:-"zabbix"}

Expand Down Expand Up @@ -119,10 +97,6 @@ check_db_connect() {
echo "* DB_SERVER_PORT: ${DB_SERVER_PORT}"
echo "* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}"
if [ "${DEBUG_MODE,,}" == "true" ]; then
if [ "${USE_DB_ROOT_USER}" == "true" ]; then
echo "* DB_SERVER_ROOT_USER: ${DB_SERVER_ROOT_USER}"
echo "* DB_SERVER_ROOT_PASS: ${DB_SERVER_ROOT_PASS}"
fi
echo "* DB_SERVER_ZBX_USER: ${DB_SERVER_ZBX_USER}"
echo "* DB_SERVER_ZBX_PASS: ${DB_SERVER_ZBX_PASS}"
fi
Expand All @@ -132,9 +106,9 @@ check_db_connect() {

ssl_opts="$(db_tls_params)"

export MYSQL_PWD="${DB_SERVER_ROOT_PASS}"
export MYSQL_PWD="${DB_SERVER_ZBX_PASS}"

while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \
while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
sleep $WAIT_TIMEOUT
Expand Down
2 changes: 0 additions & 2 deletions Dockerfiles/web-apache-mysql/ol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ printf "zabbix" | docker secret create MYSQL_PASSWORD -
docker run --name some-zabbix-web-apache-mysql -e DB_SERVER_HOST="some-mysql-server" -e MYSQL_USER_FILE=/run/secrets/MYSQL_USER -e MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD -e ZBX_SERVER_HOST="some-zabbix-server" -e PHP_TZ="some-timezone" -d zabbix/zabbix-web-apache-mysql:tag
```

This method is also applicable for `MYSQL_ROOT_PASSWORD` with `MYSQL_ROOT_PASSWORD_FILE`.

By default, values for `MYSQL_USER` and `MYSQL_PASSWORD` are `zabbix`, `zabbix`.

### `MYSQL_DATABASE`
Expand Down
32 changes: 3 additions & 29 deletions Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,10 @@ file_env() {
check_variables() {
: ${DB_SERVER_HOST:="mysql-server"}
: ${DB_SERVER_PORT:="3306"}
USE_DB_ROOT_USER=false
CREATE_ZBX_DB_USER=false

file_env MYSQL_USER
file_env MYSQL_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
echo "**** Impossible to use MySQL server because of unknown Zabbix user and random 'root' password"
exit 1
fi

if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" != "true" ]; then
echo "*** Impossible to use MySQL server because 'root' password is not defined and it is not empty"
exit 1
fi

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi

[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true

# If root password is not specified use provided credentials
: ${DB_SERVER_ROOT_USER:=${MYSQL_USER}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
DB_SERVER_ZBX_USER=${MYSQL_USER:-"zabbix"}
DB_SERVER_ZBX_PASS=${MYSQL_PASSWORD:-"zabbix"}

Expand Down Expand Up @@ -119,10 +97,6 @@ check_db_connect() {
echo "* DB_SERVER_PORT: ${DB_SERVER_PORT}"
echo "* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}"
if [ "${DEBUG_MODE,,}" == "true" ]; then
if [ "${USE_DB_ROOT_USER}" == "true" ]; then
echo "* DB_SERVER_ROOT_USER: ${DB_SERVER_ROOT_USER}"
echo "* DB_SERVER_ROOT_PASS: ${DB_SERVER_ROOT_PASS}"
fi
echo "* DB_SERVER_ZBX_USER: ${DB_SERVER_ZBX_USER}"
echo "* DB_SERVER_ZBX_PASS: ${DB_SERVER_ZBX_PASS}"
fi
Expand All @@ -132,9 +106,9 @@ check_db_connect() {

ssl_opts="$(db_tls_params)"

export MYSQL_PWD="${DB_SERVER_ROOT_PASS}"
export MYSQL_PWD="${DB_SERVER_ZBX_PASS}"

while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \
while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
sleep $WAIT_TIMEOUT
Expand Down
2 changes: 0 additions & 2 deletions Dockerfiles/web-apache-mysql/ubuntu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ printf "zabbix" | docker secret create MYSQL_PASSWORD -
docker run --name some-zabbix-web-apache-mysql -e DB_SERVER_HOST="some-mysql-server" -e MYSQL_USER_FILE=/run/secrets/MYSQL_USER -e MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD -e ZBX_SERVER_HOST="some-zabbix-server" -e PHP_TZ="some-timezone" -d zabbix/zabbix-web-apache-mysql:tag
```

This method is also applicable for `MYSQL_ROOT_PASSWORD` with `MYSQL_ROOT_PASSWORD_FILE`.

By default, values for `MYSQL_USER` and `MYSQL_PASSWORD` are `zabbix`, `zabbix`.

### `MYSQL_DATABASE`
Expand Down
Loading

0 comments on commit 37f90e7

Please sign in to comment.