Networking on docker-stack

Hello to all
I want to assign a static IP to my container . I ran this code and I didn’t get any error. But it doesn’t work properly .when I run command “sudo docker inspect ims_pcscf” I see that it gets different IP from my network pool.

My code is:

version: "3.8"
services:
    pcscf:
      image: openims/pcscf-v5
      command: bash /opt/OpenIMSCore/pcscf.sh
      deploy:
        mode: replicated
        replicas: 3
      networks:
        barkati:
          ipv4_address: 192.168.2.11

networks:
      barkati:
        external: true

Can you share, how this topic is different than the one you already created?

I kind of feel the answer should be already in this topic.

Thank you for your attention
In the previous topic my problem was an error when I ran my yml file.
But now I don’t get any error when running the code ، and in this topic I used overlay network
Anyway my code doesn’t work properly.

Though what I wrote in the other thread still applies:

Static ipv4_addresses are not implemented for swarm services. It doesn’t make sense to implement them for swarm service containers, as they can have replicas. Though, It would make sense to implement them for the service vip - but again: not implemented.