Files
ocr_gateway_test/config/setting.py
2025-10-27 09:18:24 +09:00

24 lines
632 B
Python

import os
from dotenv import load_dotenv
load_dotenv()
# Redis 기본 설정
REDIS_HOST = os.getenv("REDIS_HOST", "ocr_gateway_redis")
REDIS_PORT = os.getenv("REDIS_PORT", 6379)
REDIS_DB = os.getenv("REDIS_DB", 0)
# Celery 설정
CELERY_BROKER_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/0"
CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:{REDIS_PORT}/1"
# Celery Flower 설정
CELERY_FLOWER = os.getenv("CELERY_FLOWER", "http://ocr_gateway_flower:5556/api/workers")
# Upsage API Key
UPSTAGE_API_KEY = os.getenv("UPSTAGE_API_KEY")
UPSTAGE_API_URL = os.getenv(
"UPSTAGE_API_URL", "https://api.upstage.ai/v1/document-ai/ocr"
)