services:
  file_generate:
    build:
      context: ./FileCreator
      dockerfile: Dockerfile
    volumes:
      - ./data:/var/data  # Монтирование локальной папки data в /var/data в контейнере

  first_service:
    build:
      context: ./FirstService
      dockerfile: Dockerfile
    volumes:
      - ./data:/var/data
      - ./data:/var/result
    depends_on:
      - file_generate

  second_service:
    build:
      context: ./SecondService
      dockerfile: Dockerfile
    volumes:
      - ./data:/var/data
      - ./data:/var/result
    depends_on:
      - first_service