Hello , im facing this error everytime i try install zabbix with docker compose usin swarm and docker stack , but when i lunch docker-compose up everything works fine , but when i use docker stack deploy everytime i got errors like : unable to setup database , or existing table , or user error
1- docker compose file :
Also, please let me know how you configured mysql to replicate database state between the container replicas.
Adding replicas to a service does not work if the application inside the containers are not configured to use a shared state, have build-in replication or some sort of consensus, except when the application is compeletly stateless and/or stores state only in a database.
Hello, i just write the compose file with zabbix needed services , mysql i added env settings like host , user password , when i lunch with docker compose up d everything works fine except when i use docker stack deploy i have issues
Container orchestration and Cloud providers make it easy to run replicas of services, but they DO NOT solve how these services are replicated and synchonize a global state. The service must support replcation by itself and needs to be configured properly to actually be used with it replica instances.
So, please let me understand how you replicate database state amongst the replica instances.
If this is not solved, then each database replica will have a different state, as if you run 3 distinct databases, that just happen to be reachable by the same service vip (think of it as a load balancer in front of the replica instances)
I will explain what i did :
1-i installed 2 vms through hyper v (one will be manager and second act like worker ) i want make HA , when a server is down the other starts
2- i set docker swarm init in first server
3- i joined the second server with docker swarm join
4- i found a compose file with (zabbix server + web interface+ mysql or pgsql + zabbix agent )
5- in compose file when i write in mysql service i set replicas = 1 or 2 its always the same problem