add core-api controllers to maintain portainer, npm and organizr deploys
This commit is contained in:
@@ -4,6 +4,25 @@ Global configuration for Core Code API
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
# Import infrastructure credentials from gitignored module
|
||||
try:
|
||||
from src.credentials import (
|
||||
PORTAINER_URL, PORTAINER_API_KEY,
|
||||
NPM_URL, NPM_EMAIL, NPM_PASSWORD,
|
||||
KUMA_URL, KUMA_USERNAME, KUMA_PASSWORD
|
||||
)
|
||||
except ImportError:
|
||||
# Fallback to empty strings if credentials.py doesn't exist
|
||||
# (e.g., fresh clone before credentials setup)
|
||||
PORTAINER_URL = "http://localhost:8001"
|
||||
PORTAINER_API_KEY = ""
|
||||
NPM_URL = "http://localhost:81"
|
||||
NPM_EMAIL = ""
|
||||
NPM_PASSWORD = ""
|
||||
KUMA_URL = "http://localhost:3001"
|
||||
KUMA_USERNAME = ""
|
||||
KUMA_PASSWORD = ""
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Global application settings"""
|
||||
@@ -58,17 +77,17 @@ class Settings(BaseSettings):
|
||||
embedding_dimension: int = 384
|
||||
embedding_batch_size: int = 32
|
||||
|
||||
# Infrastructure Management
|
||||
portainer_url: str = "http://localhost:8001"
|
||||
portainer_api_key: str = ""
|
||||
# Infrastructure Management (from credentials.py)
|
||||
portainer_url: str = PORTAINER_URL
|
||||
portainer_api_key: str = PORTAINER_API_KEY
|
||||
|
||||
npm_url: str = "http://localhost:81"
|
||||
npm_email: str = ""
|
||||
npm_password: str = ""
|
||||
npm_url: str = NPM_URL
|
||||
npm_email: str = NPM_EMAIL
|
||||
npm_password: str = NPM_PASSWORD
|
||||
|
||||
kuma_url: str = "http://localhost:3001"
|
||||
kuma_username: str = ""
|
||||
kuma_password: str = ""
|
||||
kuma_url: str = KUMA_URL
|
||||
kuma_username: str = KUMA_USERNAME
|
||||
kuma_password: str = KUMA_PASSWORD
|
||||
|
||||
@property
|
||||
def model_aliases(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user