/usr/bin/docker run --restart=always \
--name mysql-for-zabbix -t \
-v /opt/zabbix/database:/var/lib/mysql \
-v /opt/zabbix/import:/tmp/import \
-v /opt/zabbix/flush:/tmp/flush \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="zabbix_pwd" \
-e MYSQL_ROOT_PASSWORD="zabbix_pwd" \
-d mysql:5.7 \
--character-set-server=utf8 --collation-server=utf8_bin
/usr/bin/docker run --restart=always \
--name zabbix-java-gateway -t \
-d zabbix/zabbix-java-gateway:latest
/usr/bin/docker run --restart=always \
--add-host mainhost:
/sbin/ip route | grep docker | awk '{ print $9}'
\
--name zabbix-server-mysql -t \
-e DB_SERVER_HOST="mysql-for-zabbix" \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="zabbix_pwd" \
-e MYSQL_ROOT_PASSWORD="zabbix_pwd" \
-p 10051:10051 \
--link mysql-for-zabbix:mysql \
--link zabbix-java-gateway:zabbix-java-gateway \
-v /opt/zabbix/scripts:/usr/lib/zabbix/alertscripts \
-d
docker-registry.ego-cms.com:5043/zabbix/zabbix-server-mysql:centos-latest /usr/bin/docker run --restart=always \
--name nginx-proxy -t \
-p 80:80 \
-p 443:443\
-v /opt/zabbix/crt:/etc/nginx/certs \
-v /etc/nginx/vhost.d \
-v /usr/share/nginx/html \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
-d jwilder/nginx-proxy
/usr/bin/docker run --restart=always \
--name nginx-proxy-letsencrypt -t \
--volumes-from nginx-proxy \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-d jrcs/letsencrypt-nginx-proxy-companion
/usr/bin/docker run --restart=always \
--name zabbix-web-nginx-mysql -t \
-e DB_SERVER_HOST="mysql-for-zabbix" \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="zabbix_pwd" \
-e MYSQL_ROOT_PASSWORD="zabbix_pwd" \
-e "VIRTUAL_HOST=
zabbix.ego-cms.com" \
-e "LETSENCRYPT_HOST=
zabbix.ego-cms.com" \
-e "
LETSENCRYPT_EMAIL=egostatuspage@gmail.com" \
--link mysql-for-zabbix:mysql \
--link zabbix-server-mysql:zabbix-server \
-d zabbix/zabbix-web-nginx-mysql:latest
#=$( docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' zabbix-server-mysql )
# -e "s/Server=.*=${ZABBIXHOST}" -e "s/ServerActive=.*=${ZABBIXHOST}" -i.bak /etc/zabbix/zabbix_agentd.conf
zabbix-agent restart