I have a question about container communication, in my docker-compose I am creating a link between the web and mysql container. Would this link be an internal network?
If not, would it be more performative to create an internal network?
docker-compose.yml
version: "3.3"
services:
mysql:
container_name: mysql
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: SENHA
MYSQL_DATABASE: webApp
MYSQL_USER: root
MYSQL_PASSWORD: senha
restart: always
ports:
- 3306:3306
web:
container_name: web
image: web_dev
build:
context: .
dockerfile: Dockerfile-web
volumes:
- ../Desenvolvimento Web/:/var/www
- ./Apache/:/etc/apache2/sites-enabled/
working_dir: /var/www
depends_on:
- mysql
links:
- mysql
restart: always
ports:
- 80:80