version: "3.9" services: data_generator: image: python:3.10-slim volumes: - ./data_generator:/app - ./data:/data working_dir: /app command: python data_gen.py worker_1: build: context: ./worker_1 volumes: - ./data:/data depends_on: - data_generator worker_2: build: context: ./worker_2 volumes: - ./data:/data depends_on: - worker_1