services: first: build: ./worker_1/ volumes: - ./data:/var/data - ./result_first:/var/result second: build: ./worker_2/ depends_on: - first volumes: - ./result_first:/var/data - ./result_second:/var/result