version: '3.8' services: data-generator: build: ./data_generator volumes: - ./data:/var/data command: ["python", "generate_data.py"] worker1: build: ./worker-1 volumes: - ./data:/var/data - ./result:/var/result depends_on: - data-generator worker2: build: ./worker-2 volumes: - ./data:/var/data - ./result:/var/result depends_on: - worker1 volumes: data: result: