diff --git a/.claude/settings.local.json b/.claude/settings.local.json index c370431..8f8203c 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,8 +1,7 @@ { "permissions": { "allow": [ - "Bash(*:*)", - "Bash(*)" + "Bash(podman-compose:*)" ], "deny": [], "ask": [], diff --git a/deploy/docker/Dockerfile.api b/deploy/docker/Dockerfile.api index e281d4b..1163e46 100644 --- a/deploy/docker/Dockerfile.api +++ b/deploy/docker/Dockerfile.api @@ -41,8 +41,14 @@ COPY src/ /app/src/ COPY config/ /app/config/ COPY pyproject.toml README.md /app/ -# Install the package in editable mode -RUN pip install --no-cache-dir -e /app +# Install poetry-core (required for install with pyproject.toml) +RUN pip install --no-cache-dir poetry-core + +# Install the package +RUN pip install --no-cache-dir /app + +# Set PYTHONPATH to ensure module can be imported +ENV PYTHONPATH=/app/src:$PYTHONPATH # Create necessary directories RUN mkdir -p /app/logs /app/output diff --git a/deploy/docker/Dockerfile.chat b/deploy/docker/Dockerfile.chat index 7cd161b..76f32b1 100644 --- a/deploy/docker/Dockerfile.chat +++ b/deploy/docker/Dockerfile.chat @@ -37,8 +37,14 @@ COPY src/ /app/src/ COPY config/ /app/config/ COPY pyproject.toml README.md /app/ -# Install the package in editable mode -RUN pip install --no-cache-dir -e /app +# Install poetry-core (required for install with pyproject.toml) +RUN pip install --no-cache-dir poetry-core + +# Install the package +RUN pip install --no-cache-dir /app + +# Set PYTHONPATH to ensure module can be imported +ENV PYTHONPATH=/app/src:$PYTHONPATH # Create necessary directories RUN mkdir -p /app/logs diff --git a/deploy/docker/Dockerfile.worker b/deploy/docker/Dockerfile.worker index c37309b..d718d28 100644 --- a/deploy/docker/Dockerfile.worker +++ b/deploy/docker/Dockerfile.worker @@ -41,8 +41,14 @@ COPY src/ /app/src/ COPY config/ /app/config/ COPY pyproject.toml README.md /app/ -# Install the package in editable mode -RUN pip install --no-cache-dir -e /app +# Install poetry-core (required for install with pyproject.toml) +RUN pip install --no-cache-dir poetry-core + +# Install the package +RUN pip install --no-cache-dir /app + +# Set PYTHONPATH to ensure module can be imported +ENV PYTHONPATH=/app/src:$PYTHONPATH # Create necessary directories RUN mkdir -p /app/logs /app/output diff --git a/deploy/docker/docker-compose.dev.yml b/deploy/docker/docker-compose.dev.yml index a13f62a..049e37f 100644 --- a/deploy/docker/docker-compose.dev.yml +++ b/deploy/docker/docker-compose.dev.yml @@ -1,9 +1,9 @@ -version: '3.8' +version: "3.8" services: # MongoDB Database mongodb: - image: mongo:7-jammy + image: docker.io/library/mongo:7-jammy container_name: datacenter-docs-mongodb-dev ports: - "27017:27017" @@ -24,7 +24,7 @@ services: # Redis Cache & Message Broker redis: - image: redis:7-alpine + image: docker.io/library/redis:7-alpine container_name: datacenter-docs-redis-dev ports: - "6379:6379" @@ -123,7 +123,7 @@ services: # Flower - Celery Monitoring flower: - image: mher/flower:2.0 + image: docker.io/mher/flower:2.0 container_name: datacenter-docs-flower-dev ports: - "5555:5555" @@ -145,7 +145,7 @@ services: dockerfile: deploy/docker/Dockerfile.frontend container_name: datacenter-docs-frontend-dev ports: - - "80:80" + - "8080:80" depends_on: - api - chat diff --git a/src/datacenter_docs/chat/main.py b/src/datacenter_docs/chat/main.py new file mode 100644 index 0000000..97474f8 --- /dev/null +++ b/src/datacenter_docs/chat/main.py @@ -0,0 +1,59 @@ +""" +Chat server stub for development. + +TODO: Implement full chat server with WebSocket support. +Currently this is a minimal stub to allow the development environment to start. +""" +import logging +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +# Configure logging +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + +# Create FastAPI app +app = FastAPI( + title="Datacenter Documentation Chat Server", + description="WebSocket-based chat interface for documentation queries (STUB - NOT IMPLEMENTED)", + version="1.0.0", +) + +# Configure CORS +app.add_middleware( + CORSMiddleware, + allow_origins=["*"], # In production, restrict this + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +@app.get("/health") +async def health_check(): + """Health check endpoint.""" + return {"status": "ok", "service": "chat", "implemented": False} + + +@app.get("/") +async def root(): + """Root endpoint.""" + return { + "message": "Chat server stub - not yet implemented", + "status": "stub", + "todo": "Implement WebSocket chat functionality", + } + + +# TODO: Implement WebSocket endpoint for chat +# @app.websocket("/ws") +# async def websocket_endpoint(websocket: WebSocket): +# await websocket.accept() +# # Implement chat logic here + + +if __name__ == "__main__": + import uvicorn + + logger.info("Starting chat server stub on port 8001...") + uvicorn.run(app, host="0.0.0.0", port=8001)