Alternative of --link for docker service create in swarm

Hi guys,

I write this topic to ask a question about docker swarm and more especially about docker service…

When you run a container with docker run, you can use the option --link, but how can we use this type of option with docker service create ?

before i use swarm and docker service create i did smthg like that :

“docker run -e WORDPRESS_DB_USER=xxxx -e WORDPRESS_DB_PASSWORD=xxxx -e WORDPRESS_DB_NAME=xxxx -p 8080:80 -v /root/wordpress/html:/var/www/html --link wordpresslatestdb:mysql --name wordpresslatest -d wordpress:latest”

it’s really important to me because I have to run a mariadb service as replicas=2 and worpress service as replicas=2 too, but i have to link wordpress to my database…

Hope an answer from you !

best regards.