services:
  app:
    build: .
    ports:
      - "5173:5173"
    environment:
      - PLAYWRIGHT_WS_ENDPOINT=ws://playwright-service:3000
      - OPENAI_BASE_URL=http://ollama:11434/v1
      - OPENAI_API_KEY=ollama
      - LLM_MODEL=llama3.2
    volumes:
      - ./src:/app/src
      - ./secrets:/app/secrets:ro
    depends_on:
      - playwright-service
      - ollama

  playwright-service:
    build: ./playwright-service
    ipc: host
    ports: ["3000:3000"]
    environment:
      - DISPLAY=:99
    security_opt:
      - seccomp=unconfined

  ollama:
    image: ollama/ollama:latest
    ports: ["11434:11434"]
    volumes:
      - ollama_data:/root/.ollama

volumes:
  ollama_data: