version: '3.8' services: worker1: build: context: ./worker-1 volumes: - ./data:/var/data - ./result:/var/result worker2: build: context: ./worker-2 volumes: - ./result:/var/result depends_on: - worker1