Last active
May 13, 2021 21:11
-
-
Save andretapxure/9c55e2fb4b0a417072aad311700865cc to your computer and use it in GitHub Desktop.
Zabbix 5 docker-compose file with external database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.7' | |
| #Dont forget to create mysql user with native password authentication | |
| #create user 'zabbix'@'172.%' IDENTIFIED WITH mysql_native_password BY 'MySQLPasswordHere'; | |
| services: | |
| server: | |
| image: | |
| zabbix/zabbix-server-mysql:alpine-5.0-latest | |
| ports: | |
| - 10051:10051 | |
| environment: | |
| - DB_SERVER_HOST=172.17.0.1 | |
| - MYSQL_USER=zabbix | |
| - MYSQL_PASSWORD=MySQLPasswordHere | |
| - MYSQL_DATABASE=zabbix5 | |
| - PHP_TZ=America/Sao_Paulo | |
| - ZBX_STARTPOLLERS=20 | |
| deploy: | |
| placement: | |
| constraints: [node.role == manager] | |
| web: | |
| image: | |
| zabbix/zabbix-web-nginx-mysql:alpine-5.0-latest | |
| ports: | |
| - 80:8080 | |
| environment: | |
| - ZBX_SERVER_HOST=server | |
| - DB_SERVER_HOST=172.17.0.1 | |
| - MYSQL_USER=zabbix | |
| - MYSQL_PASSWORD=MySQLPasswordHere | |
| - MYSQL_DATABASE=zabbix | |
| - PHP_TZ=America/Sao_Paulo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment