mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-20 12:28:37 +01:00
Removed MySQL root secret for server and proxy containers
This commit is contained in:
parent
bf8b26a5d8
commit
1d8a654840
@ -7,6 +7,7 @@ services:
|
||||
- --character-set-server=utf8
|
||||
- --collation-server=utf8_bin
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
# Use TLS encryption for connections to database
|
||||
# - --require-secure-transport
|
||||
# - --ssl-ca=/run/secrets/root-ca.pem
|
||||
# - --ssl-cert=/run/secrets/server-cert.pem
|
||||
@ -14,9 +15,12 @@ services:
|
||||
restart: "${RESTART_POLICY}"
|
||||
volumes:
|
||||
- ${DATA_DIRECTORY}/var/lib/mysql:/var/lib/mysql:rw
|
||||
- ${ENV_VARS_DIRECTORY}/mysql_init/init_proxy_db.sql:/docker-entrypoint-initdb.d/mysql_init_proxy.sql:ro
|
||||
# - dbsocket:/var/run/mysqld/
|
||||
env_file:
|
||||
- ${ENV_VARS_DIRECTORY}/.env_db_mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
|
||||
secrets:
|
||||
- MYSQL_USER
|
||||
- MYSQL_PASSWORD
|
||||
|
@ -65,8 +65,6 @@ services:
|
||||
secrets:
|
||||
- MYSQL_USER
|
||||
- MYSQL_PASSWORD
|
||||
- MYSQL_ROOT_USER
|
||||
- MYSQL_ROOT_PASSWORD
|
||||
# - client-key.pem
|
||||
# - client-cert.pem
|
||||
# - root-ca.pem
|
||||
@ -171,8 +169,6 @@ services:
|
||||
secrets:
|
||||
- MYSQL_USER
|
||||
- MYSQL_PASSWORD
|
||||
- MYSQL_ROOT_USER
|
||||
- MYSQL_ROOT_PASSWORD
|
||||
# - client-key.pem
|
||||
# - client-cert.pem
|
||||
# - root-ca.pem
|
||||
|
@ -6,7 +6,7 @@ MYSQL_USER_FILE=/run/secrets/MYSQL_USER
|
||||
# MYSQL_PASSWORD=zabbix
|
||||
MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD
|
||||
# MYSQL_ROOT_PASSWORD=
|
||||
MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
|
||||
# MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
|
||||
# MYSQL_ALLOW_EMPTY_PASSWORD=false
|
||||
# MYSQL_DATABASE=zabbix
|
||||
MYSQL_DATABASE=zabbix
|
||||
|
@ -8,7 +8,6 @@ MYSQL_USER=zabbix
|
||||
MYSQL_PASSWORD=zabbix
|
||||
# MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD
|
||||
# MYSQL_ROOT_PASSWORD=
|
||||
MYSQL_ROOT_PASSWORD=root_pwd
|
||||
# MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
|
||||
# MYSQL_ALLOW_EMPTY_PASSWORD=false
|
||||
# MYSQL_DATABASE=zabbix_proxy
|
||||
|
2
env_vars/mysql_init/init_proxy_db.sql
Normal file
2
env_vars/mysql_init/init_proxy_db.sql
Normal file
@ -0,0 +1,2 @@
|
||||
CREATE DATABASE IF NOT EXISTS `zabbix_proxy`;
|
||||
GRANT ALL ON `zabbix_proxy`.* TO 'zabbix'@'%';
|
Loading…
Reference in New Issue
Block a user