chore: improve Docker/Podman compatibility and package installation
Some checks failed
CI/CD Pipeline / Generate Documentation (push) Successful in 4m14s
CI/CD Pipeline / Lint Code (push) Successful in 4m39s
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Run Tests (push) Has been cancelled
Some checks failed
CI/CD Pipeline / Generate Documentation (push) Successful in 4m14s
CI/CD Pipeline / Lint Code (push) Successful in 4m39s
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Run Tests (push) Has been cancelled
- Update Claude permissions to allow podman-compose commands - Improve Dockerfile package installation with poetry-core - Switch to explicit docker.io image references for Podman compatibility - Add PYTHONPATH configuration to ensure proper module imports - Change frontend port from 80 to 8080 for non-root compatibility - Add initial chat server implementation (main.py) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Bash(*:*)",
|
"Bash(podman-compose:*)"
|
||||||
"Bash(*)"
|
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": [],
|
"ask": [],
|
||||||
|
|||||||
@@ -41,8 +41,14 @@ COPY src/ /app/src/
|
|||||||
COPY config/ /app/config/
|
COPY config/ /app/config/
|
||||||
COPY pyproject.toml README.md /app/
|
COPY pyproject.toml README.md /app/
|
||||||
|
|
||||||
# Install the package in editable mode
|
# Install poetry-core (required for install with pyproject.toml)
|
||||||
RUN pip install --no-cache-dir -e /app
|
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
|
# Create necessary directories
|
||||||
RUN mkdir -p /app/logs /app/output
|
RUN mkdir -p /app/logs /app/output
|
||||||
|
|||||||
@@ -37,8 +37,14 @@ COPY src/ /app/src/
|
|||||||
COPY config/ /app/config/
|
COPY config/ /app/config/
|
||||||
COPY pyproject.toml README.md /app/
|
COPY pyproject.toml README.md /app/
|
||||||
|
|
||||||
# Install the package in editable mode
|
# Install poetry-core (required for install with pyproject.toml)
|
||||||
RUN pip install --no-cache-dir -e /app
|
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
|
# Create necessary directories
|
||||||
RUN mkdir -p /app/logs
|
RUN mkdir -p /app/logs
|
||||||
|
|||||||
@@ -41,8 +41,14 @@ COPY src/ /app/src/
|
|||||||
COPY config/ /app/config/
|
COPY config/ /app/config/
|
||||||
COPY pyproject.toml README.md /app/
|
COPY pyproject.toml README.md /app/
|
||||||
|
|
||||||
# Install the package in editable mode
|
# Install poetry-core (required for install with pyproject.toml)
|
||||||
RUN pip install --no-cache-dir -e /app
|
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
|
# Create necessary directories
|
||||||
RUN mkdir -p /app/logs /app/output
|
RUN mkdir -p /app/logs /app/output
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
version: '3.8'
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# MongoDB Database
|
# MongoDB Database
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:7-jammy
|
image: docker.io/library/mongo:7-jammy
|
||||||
container_name: datacenter-docs-mongodb-dev
|
container_name: datacenter-docs-mongodb-dev
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
@@ -24,7 +24,7 @@ services:
|
|||||||
|
|
||||||
# Redis Cache & Message Broker
|
# Redis Cache & Message Broker
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: docker.io/library/redis:7-alpine
|
||||||
container_name: datacenter-docs-redis-dev
|
container_name: datacenter-docs-redis-dev
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
@@ -123,7 +123,7 @@ services:
|
|||||||
|
|
||||||
# Flower - Celery Monitoring
|
# Flower - Celery Monitoring
|
||||||
flower:
|
flower:
|
||||||
image: mher/flower:2.0
|
image: docker.io/mher/flower:2.0
|
||||||
container_name: datacenter-docs-flower-dev
|
container_name: datacenter-docs-flower-dev
|
||||||
ports:
|
ports:
|
||||||
- "5555:5555"
|
- "5555:5555"
|
||||||
@@ -145,7 +145,7 @@ services:
|
|||||||
dockerfile: deploy/docker/Dockerfile.frontend
|
dockerfile: deploy/docker/Dockerfile.frontend
|
||||||
container_name: datacenter-docs-frontend-dev
|
container_name: datacenter-docs-frontend-dev
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8080:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
- chat
|
- chat
|
||||||
|
|||||||
59
src/datacenter_docs/chat/main.py
Normal file
59
src/datacenter_docs/chat/main.py
Normal file
@@ -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)
|
||||||
Reference in New Issue
Block a user