Skip to content

Instantly share code, notes, and snippets.

@andretapxure
Last active May 13, 2021 21:11
Show Gist options
  • Select an option

  • Save andretapxure/9c55e2fb4b0a417072aad311700865cc to your computer and use it in GitHub Desktop.

Select an option

Save andretapxure/9c55e2fb4b0a417072aad311700865cc to your computer and use it in GitHub Desktop.
Zabbix 5 docker-compose file with external database
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