This is a docker swarm installation. There are analogs with k8s but the swarm is easier to deploy regardless of the fact that k8s is integrated. That's simply for another day. So now there are a bunch of things that need names:
A quick search to review the docker docs did not turn up anything interesting. My definition of a docker stack is analogous to docker-compose because they use similar config files. The purpose of a docker compose is to link and name a set of services. For example an application server and a database server for storing it's data. The docker-compose file describes the services with the outside world and with each other. A comic book inventory application might be connected to a comic book database but not connected to a newspaper database. The composition file provides some ephemeral connectivity.
production requests stay in production and staging requests stay in staging.Given the 4 names above it's also important to note that there are multiple states to consider... dev, branch, staging, production... and maybe a few more. When you create the cross product from the two lists the number of names explodes and frankly requires some care. Especially when you might only have one domain or if you have multiple projects... in fact this is one of the shortcomings of traefik and micro services.
One nice thing about the gitlab+k8s design is that it simply uses a uuid and the rest is up to the user and the subsequent compose file. But then what about the other names?
But then it falls apart again...