File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- version : ' 3.8'
2-
31services :
42 codewiki :
53 image : codewiki:0.0.1
@@ -20,7 +18,7 @@ services:
2018 # Persistent storage for cache and output
2119 - ./output:/app/output
2220 # Git credentials (if needed for private repos)
23- - ~/.gitconfig:/root/.gitconfig:ro
21+ # - ~/.gitconfig:/root/.gitconfig:ro
2422 - ~/.ssh:/root/.ssh:ro
2523 restart : unless-stopped
2624 healthcheck :
Original file line number Diff line number Diff line change @@ -17,3 +17,17 @@ LLM_API_KEY = sk-1234
1717# Port for the main web application
1818APP_PORT=8000
1919
20+
21+ # =============================================================================
22+ # Logfire Configuration
23+ # =============================================================================
24+
25+ # Logfire authentication token (get from ~/.logfire/default.toml after running 'logfire auth')
26+ LOGFIRE_TOKEN=
27+
28+ # Optional: Logfire project name (defaults to auto-detection)
29+ LOGFIRE_PROJECT_NAME=codewiki
30+
31+ # Optional: Logfire service name
32+ LOGFIRE_SERVICE_NAME=codewiki
33+
Original file line number Diff line number Diff line change 99logger = logging .getLogger (__name__ )
1010
1111try :
12- logfire .configure ()
12+ # Configure logfire with environment variables for Docker compatibility
13+ logfire_token = os .getenv ('LOGFIRE_TOKEN' )
14+ logfire_project = os .getenv ('LOGFIRE_PROJECT_NAME' , 'default' )
15+ logfire_service = os .getenv ('LOGFIRE_SERVICE_NAME' , 'default' )
16+
17+ if logfire_token :
18+ # Configure with explicit token (for Docker)
19+ logfire .configure (
20+ token = logfire_token ,
21+ project_name = logfire_project ,
22+ service_name = logfire_service ,
23+ )
24+ else :
25+ # Use default configuration (for local development with logfire auth)
26+ logfire .configure (
27+ project_name = logfire_project ,
28+ service_name = logfire_service ,
29+ )
30+
1331 logfire .instrument_pydantic_ai ()
32+ logger .info (f"Logfire configured successfully for project: { logfire_project } " )
33+
1434except Exception as e :
1535 logger .warning (f"Failed to configure logfire: { e } " )
1636
You can’t perform that action at this time.
0 commit comments