infra: renamed broken references to alfred
This commit is contained in:
@@ -41,10 +41,10 @@ RAG_EMBEDDINGS_MODEL=text-embedding-3-small
|
||||
# OpenAI API Key (required for RAG embeddings)
|
||||
OPENAI_API_KEY=your-openai-api-key-here
|
||||
|
||||
# Deepseek API Key (for LLM in agent-brain)
|
||||
# Deepseek API Key (for LLM in alfred)
|
||||
DEEPSEEK_API_KEY=your-deepseek-api-key-here
|
||||
|
||||
# Agent Brain Configuration
|
||||
# Alfred Configuration
|
||||
|
||||
# LLM Provider (deepseek or ollama)
|
||||
LLM_PROVIDER=deepseek
|
||||
@@ -52,8 +52,8 @@ LLM_PROVIDER=deepseek
|
||||
# Memory storage directory (inside container)
|
||||
MEMORY_STORAGE_DIR=/data/memory
|
||||
|
||||
# API Key for agent-brain (used by LibreChat custom endpoint)
|
||||
AGENT_BRAIN_API_KEY=agent-brain-secret-key
|
||||
# API Key for alfred (used by LibreChat custom endpoint)
|
||||
ALFRED_API_KEY=alfred-secret-key
|
||||
|
||||
# External Services (Optional)
|
||||
# TMDB API Key (for movie metadata)
|
||||
|
||||
@@ -63,7 +63,6 @@ jobs:
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./brain/Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
24
Dockerfile
24
Dockerfile
@@ -30,7 +30,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
WORKDIR /tmp
|
||||
|
||||
# Copy dependency files
|
||||
COPY brain/pyproject.toml brain/poetry.lock* brain/uv.lock* Makefile ./
|
||||
COPY pyproject.toml poetry.lock* uv.lock* Makefile ./
|
||||
|
||||
# Install dependencies as root (to avoid permission issues with system packages)
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
@@ -59,12 +59,12 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
uv pip install --system -e .[dev]; \
|
||||
fi
|
||||
|
||||
COPY brain/agent/ ./agent/
|
||||
COPY brain/application/ ./application/
|
||||
COPY brain/domain/ ./domain/
|
||||
COPY brain/infrastructure/ ./infrastructure/
|
||||
COPY brain/tests/ ./tests/
|
||||
COPY brain/app.py .
|
||||
COPY alfred/agent/ ./agent/
|
||||
COPY alfred/application/ ./application/
|
||||
COPY alfred/domain/ ./domain/
|
||||
COPY alfred/infrastructure/ ./infrastructure/
|
||||
COPY alfred/tests/ ./tests/
|
||||
COPY alfred/app.py .
|
||||
|
||||
# ===========================================
|
||||
# Stage 3: Runtime
|
||||
@@ -103,11 +103,11 @@ COPY --from=builder /usr/local/lib/python${PYTHON_VERSION_SHORT}/site-packages /
|
||||
COPY --from=builder /usr/local/bin /usr/local/bin
|
||||
|
||||
# Copy application code (already owned by appuser)
|
||||
COPY --chown=appuser:appuser brain/agent/ ./agent/
|
||||
COPY --chown=appuser:appuser brain/application/ ./application/
|
||||
COPY --chown=appuser:appuser brain/domain/ ./domain/
|
||||
COPY --chown=appuser:appuser brain/infrastructure/ ./infrastructure/
|
||||
COPY --chown=appuser:appuser brain/app.py .
|
||||
COPY --chown=appuser:appuser alfred/agent/ ./agent/
|
||||
COPY --chown=appuser:appuser alfred/application/ ./application/
|
||||
COPY --chown=appuser:appuser alfred/domain/ ./domain/
|
||||
COPY --chown=appuser:appuser alfred/infrastructure/ ./infrastructure/
|
||||
COPY --chown=appuser:appuser alfred/app.py .
|
||||
|
||||
# Create volumes for persistent data
|
||||
VOLUME ["/data/memory", "/data/logs"]
|
||||
|
||||
8
Makefile
8
Makefile
@@ -3,14 +3,14 @@
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
# --- SETTINGS ---
|
||||
CORE_DIR = brain
|
||||
IMAGE_NAME = agent_media
|
||||
CORE_DIR = alfred
|
||||
IMAGE_NAME = alfred_media_organizer
|
||||
# renovate: datasource=docker depName=python
|
||||
PYTHON_VERSION = $(shell grep "python" $(CORE_DIR)/pyproject.toml | head -n 1 | sed -E 's/.*[=<>^~"]+ *([0-9]+\.[0-9]+(\.[0-9]+)?).*/\1/')
|
||||
PYTHON_VERSION_SHORT = $(shell echo $(PYTHON_VERSION) | cut -d. -f1,2)
|
||||
# Change to 'uv' when ready.
|
||||
RUNNER ?= poetry
|
||||
SERVICE_NAME = agent_media
|
||||
SERVICE_NAME = alfred
|
||||
|
||||
export IMAGE_NAME
|
||||
export PYTHON_VERSION
|
||||
@@ -157,7 +157,7 @@ init-dotenv:
|
||||
@sed -i.bak "s|CREDS_KEY=.*|CREDS_KEY=$$(openssl rand -hex 16)|" .env
|
||||
@sed -i.bak "s|CREDS_IV=.*|CREDS_IV=$$(openssl rand -hex 8)|" .env
|
||||
@sed -i.bak "s|MEILI_MASTER_KEY=.*|MEILI_MASTER_KEY=$$(openssl rand -base64 32)|" .env
|
||||
@sed -i.bak "s|AGENT_BRAIN_API_KEY=.*|AGENT_BRAIN_API_KEY=$$(openssl rand -base64 24)|" .env
|
||||
@sed -i.bak "s|ALFRED_API_KEY=.*|ALFRED_API_KEY=$$(openssl rand -base64 24)|" .env
|
||||
@rm -f .env.bak
|
||||
@echo "$(G)✅ .env created with generated secrets!$(R)"
|
||||
@echo "$(T)⚠️ Don't forget to add your API keys:$(R)"
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
# Da brain
|
||||
agent-brain:
|
||||
alfred:
|
||||
build:
|
||||
context: ./brain
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
args:
|
||||
RUNNER: ${RUNNER} # Get it from Makefile
|
||||
container_name: agent-brain
|
||||
container_name: alfred
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
ports:
|
||||
@@ -18,7 +16,7 @@ services:
|
||||
- agent-memory:/data/memory
|
||||
- agent-logs:/data/logs
|
||||
# Development: mount code for hot reload (comment out in production)
|
||||
# - ./brain:/app
|
||||
# - ./alfred:/app
|
||||
environment:
|
||||
# LLM Configuration
|
||||
LLM_PROVIDER: ${LLM_PROVIDER:-deepseek}
|
||||
@@ -46,7 +44,7 @@ services:
|
||||
- mongodb
|
||||
- meilisearch
|
||||
- rag_api
|
||||
- agent-brain
|
||||
- alfred
|
||||
env_file: .env
|
||||
environment:
|
||||
# MongoDB connection (no auth, matching LibreChat default)
|
||||
@@ -80,8 +78,8 @@ services:
|
||||
# Endpoints
|
||||
ENDPOINTS: custom
|
||||
|
||||
# Custom endpoint pointing to agent-brain
|
||||
CUSTOM_API_KEY: ${AGENT_BRAIN_API_KEY:-agent-brain-secret-key}
|
||||
# Custom endpoint pointing to alfred
|
||||
CUSTOM_API_KEY: ${ALFRED_API_KEY:-alfred-secret-key}
|
||||
|
||||
# Debug (optional)
|
||||
DEBUG_LOGGING: ${DEBUG_LOGGING:-false}
|
||||
@@ -195,7 +193,7 @@ volumes:
|
||||
librechat-logs:
|
||||
driver: local
|
||||
|
||||
# Agent Brain data
|
||||
# Alfred data
|
||||
agent-memory:
|
||||
driver: local
|
||||
agent-logs:
|
||||
|
||||
@@ -22,7 +22,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/find_media_imdb_id.json"
|
||||
url: "http://alfred:8000/manifests/find_media_imdb_id.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -32,7 +32,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/find_torrent.json"
|
||||
url: "http://alfred:8000/manifests/find_torrent.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -42,7 +42,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/add_torrent_by_index.json"
|
||||
url: "http://alfred:8000/manifests/add_torrent_by_index.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -52,7 +52,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/set_language.json"
|
||||
url: "http://alfred:8000/manifests/set_language.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -60,7 +60,7 @@ endpoints:
|
||||
# Backend Local Agent
|
||||
- name: "Local Agent"
|
||||
apiKey: "dummy_key"
|
||||
baseURL: "http://agent-brain:8000/v1"
|
||||
baseURL: "http://alfred:8000/v1"
|
||||
models:
|
||||
default: ["local-deepseek-agent"]
|
||||
fetch: false
|
||||
@@ -75,7 +75,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/find_media_imdb_id.json"
|
||||
url: "http://alfred:8000/manifests/find_media_imdb_id.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -85,7 +85,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/find_torrent.json"
|
||||
url: "http://alfred:8000/manifests/find_torrent.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -95,7 +95,7 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/add_torrent_by_index.json"
|
||||
url: "http://alfred:8000/manifests/add_torrent_by_index.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -105,6 +105,6 @@ endpoints:
|
||||
manifest:
|
||||
schema:
|
||||
type: openapi
|
||||
url: "http://agent-brain:8000/manifests/set_language.json"
|
||||
url: "http://alfred:8000/manifests/set_language.json"
|
||||
auth:
|
||||
type: none
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[tool.poetry]
|
||||
name = "agent-media"
|
||||
name = "alfred"
|
||||
version = "0.1.6"
|
||||
description = "AI agent for managing a local media library"
|
||||
authors = ["Francwa <francois.hodiaumont@gmail.com>"]
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
#TODO: Moved directory, should not be necessary anymore but need to check !!
|
||||
# Ajouter le dossier parent (brain) au PYTHONPATH
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
# sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
Reference in New Issue
Block a user