version: "3.11"
services:
  app:
    image: tobiko-app
    container_name: tobiko-app
    build:
      dockerfile: Dockerfile.app
    command: npm run dev -- --host 0.0.0.0 --port 8001
    working_dir: /app
    ports:
      - 8001:8001
    volumes:
      - ./web/client:/app
      - /app/node_modules
    tty: true
    networks:
      - tobiko-development
    depends_on:
      - api

  api:
    image: tobiko-api
    container_name: tobiko-api
    working_dir: /sqlmesh
    build:
      dockerfile: Dockerfile.api
    command: python -m uvicorn web.server.main:app --host 0.0.0.0 --port 8000 --reload
    ports:
      - 8000:8000
    volumes:
      - .:/sqlmesh
    networks:
      - tobiko-development

networks:
  tobiko-development:
    driver: bridge
