Docker compose - Portainer stack - Exposed port does not work

Hi All,

My docker compose using Portainer/Stacks does not using the exposed port as configured (8080), it is using the default port 80

Below my compose/stacks:

version: β€˜3’

services:
nextcloud:
image: nextcloud
container_name: nextcloud
restart: always
ports:
- β€œ8080:80”
volumes:
- nextcloud_data:/var/www/html
environment:
- MYSQL_PASSWORD=mypass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=192.168.1.27
- PUID=0
- PGID=0
- TZ=America/Bogota
networks:
macvlan-favernet:
ipv4_address: 192.168.1.32

networks:
macvlan-favernet:
external: true
name: macvlan-favernet

volumes:
nextcloud_data:
external: true

So, nextcloud starts and i can use, but using http://192.168.1.32:80.

Using inspect option on portainer, it is show me the default port exposed:

Need i config something else to work on 8080/tcp? Thanks for your support!

with macvlan driver you basically connect the container with the physical network and it becomes regular host on this network with all it listening ports. β€œports” or β€œexpose” directive become useless.

So, using macvlan dirver the port in docker compose can’t be changed?