快速啟動zabbix監控服務叢集
阿新 • • 發佈:2018-12-20
version: '2' services: zabbix-mysql: image: mysql:5.7 container_name: zabbix-mysql volumes: - "/data/mysql:/var/lib/mysql" - "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" restart: always ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: zabbix MYSQL_DATABASE: zabbix MYSQL_USER: zabbix MYSQL_PASSWORD: zabbix command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci zabbix-server: image: zabbix/zabbix-server-mysql:ubuntu-3.4.11 container_name: zabbix-server-mysql restart: always ports: - "10051:10051" volumes: - /etc/localtime:/etc/localtime:ro environment: - DB_SERVER_HOST=mysql - MYSQL_USER=zabbix - MYSQL_DATABASE=zabbix - MYSQL_PASSWORD=zabbix links: - zabbix-mysql:mysql zabbix-server: image: zabbix/zabbix-web-nginx-mysql:ubuntu-3.4.11 container_name: zabbix-web-nginx-mysql restart: always ports: - "8088:80" volumes: - /etc/localtime:/etc/localtime:ro environment: - DB_SERVER_HOST=mysql - MYSQL_USER=zabbix - MYSQL_DATABASE=zabbix - MYSQL_PASSWORD=zabbix TZ: "Europe/Budapest" links: - zabbix-mysql:mysql - zabbix-server:zabbix-server
啟動命令參考
docker-compose up -d
docker-compose down -v