How to map port to one of networks

Hey all!
How to create a Docker compose service that has two networks but map host port only to one of them?

vpn:
    ports:
      - target: 1194
        published: "1194"
        protocol: udp
        mode: host
        host_ip: 172.29.0.1
    networks:
     int-network:
        priority: 10
     ext-network:
      ipv4_address: 172.29.0.1
      priority: 100
networks:
  int-network:
  ext-network:
    ipam:
      config:
        - subnet: 172.29.0.0/24
          ip_range: 172.29.0.0/24
          gateway: 172.29.0.254

but it throws an error:
Error response from daemon: driver failed programming external connectivity on endpoint vpn Error starting userland proxy: listen udp4 172.29.0.1:1194: bind: cannot assign requested address

This does not work with docker compose deployments. It only does for swarm stack deployments.

This must be a host ip, not a container ip. This will work with docker compose, but not with swarm stack deployments.

This is not how it works. A published port will forward a host port to a container port.

A bridge network is private to the host and should not use ip ranges of your lan. If you intended to actually make the container join into an existing lan subnet, then you probably want to use a macvlan network. Please use the forum search about how it’s configured and what new challenges it introduces.