I am not into Docker and I have the following doubt related the docker-compose.yml file. Suppose that this is the definition of one of the container described into this file:
pgadmin: image: dpage/pgadmin4 restart: unless-stopped container_name: pgadmin4
networks:
ntpgsql:
ipv4_address: 172.21.0.3
ports:
- target: 80
published: 80
protocol: tcp
mode: host
environment:
- PGADMIN_CONFIG_SERVER_MODE=True
- PGADMIN_DEFAULT_EMAIL=nobili.andrea@gmail.com
- PGADMIN_DEFAULT_PASSWORD=123_Stella
Basically it set the IP address of this container to 172.21.0.3. My doubt is related to the ports definition. It is defining the internal and external ports in this way:
- target: 80
published: 80
What is the difference between these 2 ports? From what I have understood one is the internal and the other is the external (but what is what? and what it means?)