🚀 Add feature: Implement content retrieval system with Milvus and Attu in docker-compose.yml with relevant environment variables
This commit is contained in:
parent
082ca6c638
commit
41299d4bf1
14 changed files with 96 additions and 35 deletions
|
@ -2,3 +2,10 @@ MILVUS_HOST=
|
|||
MILVUS_PORT=
|
||||
BACKEND_URL=
|
||||
FLOWISE_PORT=
|
||||
ETCD_AUTO_COMPACTION_MODE=
|
||||
ETCD_AUTO_COMPACTION_RETENTION=
|
||||
ETCD_QUOTA_BACKEND_BYTES=
|
||||
ETCD_SNAPSHOT_COUNT=
|
||||
MINIO_ROOT_USER=
|
||||
MINIO_ROOT_PASSWORD=
|
||||
ATTU_HOST_URL=
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -163,3 +163,4 @@ cython_debug/
|
|||
#.idea/
|
||||
|
||||
/.idea/
|
||||
/volumes/
|
||||
|
|
|
@ -5,7 +5,7 @@ FROM python:3.13-slim
|
|||
WORKDIR /app
|
||||
|
||||
# Expose the port the app will run on
|
||||
EXPOSE 5000
|
||||
EXPOSE 8080
|
||||
|
||||
# Copy the current directory contents into the container
|
||||
COPY . .
|
||||
|
@ -14,4 +14,4 @@ COPY . .
|
|||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Command to run the app using Uvicorn
|
||||
CMD ["uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "5000"]
|
||||
CMD ["uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "8080"]
|
||||
|
|
0
backend/__init__.py
Normal file
0
backend/__init__.py
Normal file
0
backend/app/__init__.py
Normal file
0
backend/app/__init__.py
Normal file
|
@ -3,11 +3,11 @@ from typing import Dict
|
|||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class AnalysisRequest:
|
||||
class AnalysisRequest(BaseModel):
|
||||
analysis_type: str
|
||||
filters: Dict
|
||||
|
||||
class AnalysisResponse:
|
||||
class AnalysisResponse(BaseModel):
|
||||
result: str
|
||||
|
||||
|
||||
|
@ -21,28 +21,28 @@ class ConversionResponse(BaseModel):
|
|||
status: str
|
||||
|
||||
|
||||
class ExportRequest:
|
||||
class ExportRequest(BaseModel):
|
||||
filters: Dict
|
||||
format: str
|
||||
|
||||
|
||||
class ExportResponse:
|
||||
class ExportResponse(BaseModel):
|
||||
export_url: str
|
||||
status: str
|
||||
|
||||
|
||||
class GenerateRequest:
|
||||
class GenerateRequest(BaseModel):
|
||||
prompt: str
|
||||
|
||||
|
||||
class GenerateResponse:
|
||||
class GenerateResponse(BaseModel):
|
||||
content_url: str
|
||||
status: str
|
||||
|
||||
|
||||
class ImportRequest:
|
||||
class ImportRequest(BaseModel):
|
||||
data: str
|
||||
|
||||
|
||||
class ImportResponse:
|
||||
class ImportResponse(BaseModel):
|
||||
status: str
|
0
backend/app/routers/__init__.py
Normal file
0
backend/app/routers/__init__.py
Normal file
|
@ -1,6 +1,6 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from backend.models import AnalysisResponse, AnalysisRequest
|
||||
from app.models import AnalysisResponse, AnalysisRequest
|
||||
|
||||
analysis_router = APIRouter(prefix="/analysis", tags=["Analysis"])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from backend.models import ConversionResponse, ConversionRequest
|
||||
from app.models import ConversionResponse, ConversionRequest
|
||||
|
||||
convert_router = APIRouter(prefix="/convert", tags=["Convert"])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from backend.models import ExportRequest, ExportResponse
|
||||
from app.models import ExportRequest, ExportResponse
|
||||
|
||||
export_router = APIRouter(prefix="/export", tags=["Export"])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from backend.models import GenerateResponse, GenerateRequest
|
||||
from app.models import GenerateResponse, GenerateRequest
|
||||
|
||||
generate_router = APIRouter(prefix="/generate", tags=["Generate"])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from backend.models import ImportRequest, ImportResponse
|
||||
from app.models import ImportRequest, ImportResponse
|
||||
|
||||
import_router = APIRouter(prefix="/import", tags=["Import"])
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
from fastapi import FastAPI
|
||||
from routers.convert_router import convert_router
|
||||
from routers.import_router import import_router
|
||||
from routers.analysis_router import analysis_router
|
||||
from routers.export_router import export_router
|
||||
from routers.generate_router import generate_router
|
||||
from app.routers.convert_router import convert_router
|
||||
from app.routers.import_router import import_router
|
||||
from app.routers.analysis_router import analysis_router
|
||||
from app.routers.export_router import export_router
|
||||
from app.routers.generate_router import generate_router
|
||||
|
||||
|
||||
app = FastAPI(title="Retro API", description="Retro content management system")
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- MILVUS_HOST=${MILVUS_HOST}
|
||||
- MILVUS_PORT=${MILVUS_PORT}
|
||||
depends_on:
|
||||
- milvus
|
||||
|
||||
- "milvus"
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
|
@ -22,15 +19,74 @@ services:
|
|||
environment:
|
||||
- BACKEND_URL=${BACKEND_URL}
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
- "backend"
|
||||
etcd:
|
||||
container_name: milvus-etcd
|
||||
image: quay.io/coreos/etcd:v3.5.21
|
||||
environment:
|
||||
- ETCD_AUTO_COMPACTION_MODE=${ETCD_AUTO_COMPACTION_MODE}
|
||||
- ETCD_AUTO_COMPACTION_RETENTION=${ETCD_AUTO_COMPACTION_RETENTION}
|
||||
- ETCD_QUOTA_BACKEND_BYTES=${ETCD_QUOTA_BACKEND_BYTES}
|
||||
- ETCD_SNAPSHOT_COUNT=${ETCD_SNAPSHOT_COUNT}
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd
|
||||
command: etcd -advertise-client-urls=http://etcd:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
|
||||
healthcheck:
|
||||
test: ["CMD", "etcdctl", "endpoint", "health"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
minio:
|
||||
container_name: milvus-minio
|
||||
image: minio/minio:RELEASE.2025-04-22T22-12-26Z
|
||||
environment:
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
|
||||
ports:
|
||||
- "9001:9001"
|
||||
- "9000:9000"
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
|
||||
command: minio server /minio_data --console-address ":9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
milvus:
|
||||
image: milvusdb/milvus:latest
|
||||
container_name: milvus-standalone
|
||||
image: milvusdb/milvus:v2.5.11
|
||||
command: ["milvus", "run", "standalone"]
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
environment:
|
||||
ETCD_ENDPOINTS: etcd:2379
|
||||
MINIO_ADDRESS: minio:9000
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
|
||||
interval: 30s
|
||||
start_period: 90s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
ports:
|
||||
- "19530:19530"
|
||||
volumes:
|
||||
- milvus_data:/var/lib/milvus
|
||||
|
||||
- "9091:9091"
|
||||
depends_on:
|
||||
- "etcd"
|
||||
- "minio"
|
||||
attu:
|
||||
image: zilliz/attu:v2.5.6
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
- HOST_URL=${ATTU_HOST_URL}
|
||||
- SERVER_PORT=3001
|
||||
- MILVUS_URL=milvus:19530
|
||||
- ATTU_LOG_LEVEL=debug
|
||||
depends_on:
|
||||
- "milvus"
|
||||
flowise:
|
||||
image: flowiseai/flowise:latest
|
||||
ports:
|
||||
|
@ -38,7 +94,4 @@ services:
|
|||
environment:
|
||||
- PORT=3000
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
milvus_data:
|
||||
- "milvus"
|
||||
|
|
Loading…
Add table
Reference in a new issue