commit 54022efd312753b7d0161d8f2568c7d21a8afc81 Author: stephane.david Date: Sat Oct 31 09:56:23 2026 +0100 First version diff --git a/.env b/.env new file mode 100644 index 0000000..25d2309 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +NEXTAUTH_SECRET=bqas6LaemdVTe2d92pTP3jSIQrbRyCQO +SALT=8GKCTWH7yZ4Gke1hHXXi9iCu7s3RASL0 + +#LANGFUSE_PUBLIC_KEY=pk_gvl5M8VB0CkGta2BUYu0GUoLm2RB1Xt8 +#LANGFUSE_SECRET_KEY=sk_VTfcePcCKs50ttOpEffSXXw7SaqMylqx \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..30cf57e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..679c6b0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,86 @@ +services: + postgres: + image: postgres:16 + container_name: langfuse-postgres + restart: unless-stopped + environment: + POSTGRES_DB: langfuse + POSTGRES_USER: langfuse + POSTGRES_PASSWORD: langfuse_password + volumes: + - /var/lib/docker/volumes/stack-lgtm/langfuse/postgres_data:/var/lib/postgresql/data + networks: + - lgmtnet + + redis: + image: redis:7 + container_name: langfuse-redis + restart: unless-stopped + networks: + - lgmtnet + + langfuse: + image: langfuse/langfuse:2 + container_name: langfuse + restart: unless-stopped + depends_on: + - postgres + - redis + ports: + - "3010:3000" + environment: + DATABASE_URL: postgresql://langfuse:langfuse_password@postgres:5432/langfuse + REDIS_CONNECTION_STRING: redis://redis:6379 + TELEMETRY_ENABLED: "false" + networks: + - lgmtnet + + litellm: + image: ghcr.io/berriai/litellm:main-latest + container_name: litellm + restart: unless-stopped + command: + - "--config" + - "/app/config.yaml" + ports: + - "4000:4000" + environment: + LANGFUSE_HOST: http://langfuse:3000 + OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318 + OTEL_SERVICE_NAME: litellm + volumes: + - ./litellm/config.yaml:/app/config.yaml + depends_on: + - langfuse + - otel-collector + networks: + - lgmtnet + + tempo: + image: grafana/tempo:latest + container_name: tempo + command: + - "-config.file=/etc/tempo.yaml" + volumes: + - ./tempo/tempo.yaml:/etc/tempo.yaml + ports: + - "3200:3200" + networks: + - lgmtnet + + otel-collector: + image: otel/opentelemetry-collector-contrib:latest + container_name: otel-collector + command: + - "--config=/etc/otel/config.yaml" + volumes: + - ./otel/config.yaml:/etc/otel/config.yaml + ports: + - "4317:4317" + - "4318:4318" + networks: + - lgmtnet + +networks: + lgmtnet: + driver: bridge \ No newline at end of file diff --git a/litellm/config.yaml b/litellm/config.yaml new file mode 100644 index 0000000..8ec5144 --- /dev/null +++ b/litellm/config.yaml @@ -0,0 +1,20 @@ +model_list: + - model_name: moe-global + litellm_params: + model: models/Qwen3VL-8B-Instruct-Q4_K_M.gguf + api_base: http://pdocker4.maison:18080/v1 + api_key: top-secret + +general_settings: + master_key: zVGgQIdXeZQDrfigEY8fmeSCf0VorewOX39k2aiQjpOS3VaKcUeLQTMq5f6ZcWOD + +litellm_settings: + success_callback: + - langfuse + failure_callback: + - langfuse + service_callbacks: + - langfuse + +environment_variables: + LANGFUSE_HOST: http://langfuse:3000 \ No newline at end of file diff --git a/otel/config.yaml b/otel/config.yaml new file mode 100644 index 0000000..fe3d637 --- /dev/null +++ b/otel/config.yaml @@ -0,0 +1,36 @@ +receivers: + otlp: + protocols: + grpc: + http: + +processors: + batch: + +exporters: + prometheus: + endpoint: "0.0.0.0:9464" + otlp: + endpoint: tempo:4317 + tls: + insecure: true + logging: + verbosity: basic + +service: + pipelines: + traces: + receivers: + - otlp + processors: + - batch + exporters: + - otlp + - logging + metrics: + receivers: + - otlp + processors: + - batch + exporters: + - prometheus \ No newline at end of file diff --git a/tempo/tempo.yaml b/tempo/tempo.yaml new file mode 100644 index 0000000..e0b60b4 --- /dev/null +++ b/tempo/tempo.yaml @@ -0,0 +1,20 @@ +server: + http_listen_port: 3200 + +distributor: + receivers: + otlp: + protocols: + grpc: + http: + +storage: + trace: + backend: local + + local: + path: /tmp/tempo/traces + +compactor: + compaction: + block_retention: 168h \ No newline at end of file