chore: update env config, docker-compose, requirements and bucket init

This commit is contained in:
kcar 2026-02-21 16:29:26 +00:00
parent 3702088efb
commit dc426774a1
5 changed files with 27 additions and 17 deletions

8
.env
View File

@ -14,7 +14,7 @@ RUN_INIT=true
# - full: Full setup including demo school and users (infra → demo-school → demo-users → gais-data) # - full: Full setup including demo school and users (infra → demo-school → demo-users → gais-data)
# - infra,demo-school,demo-users: Custom combination (comma-separated) # - infra,demo-school,demo-users: Custom combination (comma-separated)
# - infra,gais-data: Infrastructure + GAIS data import # - infra,gais-data: Infrastructure + GAIS data import
INIT_MODE=full INIT_MODE=infra,demo-school,demo-users
## ===================================================== ## =====================================================
## APP INFORMATION & METADATA ## APP INFORMATION & METADATA
@ -93,7 +93,7 @@ GOOGLE_CLIENT_SECRETS_FILE=Users/kcar/ClassroomCopilot/backend/app/secrets/googl
# External Service Endpoints # External Service Endpoints
TIKA_URL=https://tika.kevlarai.com TIKA_URL=https://tika.kevlarai.com
TIKA_TIMEOUT=300 TIKA_TIMEOUT=300
DOCLING_URL=http://ubuntu-server:5001 DOCLING_URL=https://docling.kevlarai.com
## ===================================================== ## =====================================================
## DOCUMENT STRUCTURE DISCOVERY & ANALYSIS ## DOCUMENT STRUCTURE DISCOVERY & ANALYSIS
@ -200,8 +200,8 @@ DOCLING_VLM_DO_PICTURE_DESCRIPTION=true
## ===================================================== ## =====================================================
VITE_APP_URL=https://app.classroomcopilot.ai VITE_APP_URL=https://app.classroomcopilot.ai
APP_API_URL=https://api.classroomcopilot.ai APP_API_URL=https://api.classroomcopilot.ai
APP_GRAPH_URL=https://graph.classroomcopilot.ai APP_GRAPH_URL=https://192.168.0.208
APP_BOLT_URL=bolt://bolt.classroomcopilot.ai APP_BOLT_URL=bolt://192.168.0.208
## ===================================================== ## =====================================================
## REDIS CONFIGURATION & ENVIRONMENT ISOLATION ## REDIS CONFIGURATION & ENVIRONMENT ISOLATION

View File

@ -10,7 +10,7 @@ services:
networks: networks:
- kevlarai-network - kevlarai-network
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test: [ "CMD", "redis-cli", "ping" ]
interval: 5s interval: 5s
timeout: 3s timeout: 3s
retries: 5 retries: 5
@ -28,7 +28,7 @@ services:
- RUN_INIT=true - RUN_INIT=true
- INIT_MODE=${INIT_MODE:-infra} # Set via .env or override: INIT_MODE=infra,gais-data - INIT_MODE=${INIT_MODE:-infra} # Set via .env or override: INIT_MODE=infra,gais-data
- INIT_ONLY=true # Exit after init, don't start server - INIT_ONLY=true # Exit after init, don't start server
command: ["./docker-entrypoint.sh", "init-only"] command: [ "./docker-entrypoint.sh", "init-only" ]
depends_on: depends_on:
redis: redis:
condition: service_healthy condition: service_healthy
@ -49,7 +49,7 @@ services:
- RUN_INIT=${RUN_INIT:-false} # Set to 'true' to run init on startup - RUN_INIT=${RUN_INIT:-false} # Set to 'true' to run init on startup
- INIT_MODE=${INIT_MODE:-infra} # Which init tasks to run - INIT_MODE=${INIT_MODE:-infra} # Which init tasks to run
ports: ports:
- 8000:8000 - 8080:8080
depends_on: depends_on:
redis: redis:
condition: service_healthy condition: service_healthy
@ -59,6 +59,7 @@ services:
volumes: volumes:
redis-data: redis-data:
networks: networks:
kevlarai-network: kevlarai-network:
name: kevlarai-network name: kevlarai-network

View File

@ -53,7 +53,7 @@ w3lib
scikit-learn scikit-learn
# Google APIs # Google APIs
youtube-transcript-api youtube-transcript-api>=1.2.3
google-api-python-client google-api-python-client
google-auth-oauthlib google-auth-oauthlib

View File

@ -28,9 +28,9 @@ youtube = build('youtube', 'v3', developerKey=os.getenv('YOUTUBE_API_KEY'))
@router.get("/youtube-proxy") @router.get("/youtube-proxy")
async def youtube_proxy(videoId: str): async def youtube_proxy(videoId: str):
try: try:
# Fetch transcript using youtube-transcript-api transcript_list = YouTubeTranscriptApi().list(videoId)
transcript = YouTubeTranscriptApi.get_transcript(videoId, languages=['en']) transcript = transcript_list.find_transcript(['en']).fetch()
transcript_lines = [{"start": entry["start"], "duration": entry["duration"], "text": entry["text"]} for entry in transcript] transcript_lines = [{"start": entry.start, "duration": entry.duration, "text": entry.text} for entry in transcript]
# Fetch video details using YouTube Data API # Fetch video details using YouTube Data API
video_response = youtube.videos().list( video_response = youtube.videos().list(

View File

@ -46,6 +46,15 @@ def initialize_buckets() -> dict:
file_size_limit=1000 * 1024 * 1024, # 1GB file_size_limit=1000 * 1024 * 1024, # 1GB
) )
}, },
# Exam Board files
{
"id": "cc.examboards",
"options": CreateBucketOptions(
name="Classroom Copilot Exam Board Files",
public=False,
file_size_limit=1000 * 1024 * 1024, # 1GB
)
},
] ]
results = {} results = {}