version: "3.2" services: vote: build: context: ./vote/dotnet ports: - "5000:80" depends_on: - message-queue result: build: context: ./result/dotnet ports: - "5001:80" environment: - "Data:ConnectionString=Server=db;Port=4000;Database=votes;User=root;SslMode=None" depends_on: - db worker: build: context: ./worker/dotnet environment: - "Data:ConnectionString=Server=db;Port=4000;Database=votes;User=root;SslMode=None" depends_on: - message-queue - db message-queue: image: nats:nanoserver db: image: dockersamples/tidb:nanoserver ports: - "3306:4000" networks: default: external: name: nat