version: "3.2" services: vote: image: dockersamples/examplevotingapp_vote:dotnet-nanoserver-sac2016 ports: - mode: host target: 80 published: 5000 deploy: endpoint_mode: dnsrr networks: - frontend - backend result: image: dockersamples/examplevotingapp_result:dotnet-nanoserver-sac2016 environment: - "ConnectionStrings:ResultData=Server=db;Port=4000;Database=votes;User=root;SslMode=None" ports: - mode: host target: 80 published: 5001 deploy: endpoint_mode: dnsrr networks: - frontend - backend worker: image: dockersamples/examplevotingapp_worker:dotnet-nanoserver-sac2016 environment: - "ConnectionStrings:VoteData=Server=db;Port=4000;Database=votes;User=root;SslMode=None" deploy: endpoint_mode: dnsrr mode: replicated replicas: 3 networks: - backend message-queue: image: nats:nanoserver deploy: endpoint_mode: dnsrr networks: - backend db: image: dockersamples/tidb:nanoserver ports: - mode: host target: 4000 published: 3306 deploy: endpoint_mode: dnsrr networks: - backend networks: frontend: backend: