Fix env var loading for Docker: support GITEA_TOKEN fallback, configurable Paperclip DB URL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ def _host() -> str:
|
||||
|
||||
|
||||
def _token() -> str:
|
||||
return os.environ.get("GITEA_ACCESS_TOKEN", "")
|
||||
return os.environ.get("GITEA_ACCESS_TOKEN") or os.environ.get("GITEA_TOKEN", "")
|
||||
|
||||
|
||||
async def create_repo(case_number: str, title: str, description: str = "") -> dict:
|
||||
|
||||
@@ -3,13 +3,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import asyncpg
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
PAPERCLIP_DB_URL = "postgresql://paperclip:paperclip@127.0.0.1:54329/paperclip"
|
||||
PAPERCLIP_DB_URL = os.environ.get(
|
||||
"PAPERCLIP_DB_URL", "postgresql://paperclip:paperclip@127.0.0.1:54329/paperclip"
|
||||
)
|
||||
|
||||
# Company IDs from Paperclip DB
|
||||
COMPANIES = {
|
||||
|
||||
Reference in New Issue
Block a user