mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-23 14:59:00 +01:00
Removed MySQL root secret for server and proxy containers
This commit is contained in:
parent
7fbca79b47
commit
3292d0df09
@ -6,8 +6,8 @@ services:
|
||||
- mysqld
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_bin
|
||||
# Only during upgrade from versions prior 6.4
|
||||
# - --log_bin_trust_function_creators=1
|
||||
# Only during upgrade from versions prior 6.4 and new installations (schema deployment)
|
||||
- --log_bin_trust_function_creators=1
|
||||
# Use TLS encryption for connections to database
|
||||
# - --require-secure-transport
|
||||
# - --ssl-ca=/run/secrets/root-ca.pem
|
||||
@ -16,9 +16,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