services:
  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    container_name: claude-webui-backend
    restart: unless-stopped
    network_mode: host
    volumes:
      - /home/sumdex/.local/share/claude:/home/node/.local/share/claude:ro
      - ./config/.claude:/home/node/.claude:rw
      - ./config/.config/claude:/home/node/.config/claude:rw
      - ./config/hosts.json:/app/config/hosts.json:ro
      - /home/sumdex/.ssh/id_rsa:/home/node/.ssh/id_rsa:ro
      - /home/sumdex/.ssh/known_hosts:/home/node/.ssh/known_hosts:ro
      - /home/sumdex/projects:/projects:rw
      - /home/sumdex/docker:/docker:rw
      - /opt/stacks:/stacks:rw
    environment:
      - NODE_ENV=production
      - HOST=100.105.142.13
      - PORT=3001
      - PATH=/home/node/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

  frontend:
    build:
      context: ./frontend
      dockerfile: Dockerfile.dev
    container_name: claude-webui-frontend-dev
    restart: unless-stopped
    ports:
      - "100.105.142.13:3000:5173"
    volumes:
      - ./frontend/src:/app/src:ro
      - ./frontend/index.html:/app/index.html:ro
      - ./frontend/vite.config.js:/app/vite.config.js:ro
      - ./frontend/tailwind.config.js:/app/tailwind.config.js:ro
      - ./frontend/postcss.config.js:/app/postcss.config.js:ro
    environment:
      - VITE_WS_URL=ws://100.105.142.13:3001
      - VITE_API_URL=http://100.105.142.13:3001
    depends_on:
      - backend
    networks:
      - claude-webui

networks:
  claude-webui:
    name: claude-webui
