I need to upload the application container and mysql server on the same host, but the containers can not find mysql server, can you help me?
#####DOCKER COMPOSE
version: '3'
services:
proxy:
image: nginx
ports:
- "80:80"
- "443:443"
volumes:
- /home/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- /home/docker/nginx/ssl/:/etc/nginx/ssl/
links:
- zabbix-web:zabbix-web
zabbix-web:
image: zabbix/zabbix-web-nginx-mysql:ubuntu-latest
links:
- zabbix-server:zabbix-server
- mysql-server:mysql-server
environment:
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
- ZBX_SERVER_HOST=zabbix-server
- TZ=America/Sao_Paulo
zabbix-server:
image: zabbix/zabbix-server-mysql:ubuntu-latest
links:
- mysql-server:mysql-server
ports:
- "10051:10051"
volumes:
- /home/docker/zabbix-server/script/:/usr/lib/zabbix/alertscripts
environment:
- MYSQL_USER=user
- MYSQL_PASSWORD=pass
mysql-server:
image: mysql/mysql-server:5.6
volumes:
- /home/data/mysql/:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=pass
#####ERROR
#docker logs docker_zabbix-server_1
**Deploying Zabbix server with mysql database
** Preparing the system
** Preparing Zabbix server
********************
* DB_SERVER_HOST: mysql-server
* DB_SERVER_PORT: 3306
* DB_SERVER_DBNAME: zabbix
* DB_SERVER_ZBX_USER: user
* DB_SERVER_ZBX_PASS: pass
********************
**** MySQL server is not available. Waiting 5 seconds...
**** MySQL server is not available. Waiting 5 seconds...
**** MySQL server is not available. Waiting 5 seconds...