chore(service-config): 🔧 Update deployment configuration script with new options and adjusted defaults
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
7e7b2897f4
commit
6300c8aaf5
1 changed files with 48 additions and 0 deletions
48
scripts/run/service_config.py
Normal file
48
scripts/run/service_config.py
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
"""Service configuration compatibility shim for @imajin.
|
||||
|
||||
Delegates to lilith_workspace_runner.service_registry, preserving the original
|
||||
2-argument API that local commands (generate_command.py) depend on.
|
||||
"""
|
||||
from pathlib import Path
|
||||
|
||||
from lilith_workspace_runner.config import WorkspaceConfig
|
||||
from lilith_workspace_runner.service_registry import (
|
||||
get_service_config as _get_service_config,
|
||||
list_services as _list_services,
|
||||
)
|
||||
|
||||
_WORKSPACE_ROOT = Path(__file__).resolve().parent.parent.parent
|
||||
|
||||
_CONFIG = WorkspaceConfig(
|
||||
name="@imajin",
|
||||
service_ports_file="ports.yaml",
|
||||
service_ports_section="imajin",
|
||||
service_dirs={
|
||||
"classifier": "services/imajin-request-classifier/service",
|
||||
"diffusion": "services/imajin-diffusion/service",
|
||||
"prompt": "services/imajin-prompt/service",
|
||||
"processing": "services/imajin-processing/service",
|
||||
"aesthetic": "services/imajin-aesthetic/service",
|
||||
"semantic": "services/imajin-semantic/service",
|
||||
"moderator": "services/imajin-moderator/service",
|
||||
"identity": "services/imajin-identity/service",
|
||||
},
|
||||
service_apps={
|
||||
"classifier": "src.api.main:app",
|
||||
"diffusion": "src.api.main:app",
|
||||
"prompt": "src.api.main:app",
|
||||
"aesthetic": "src.api.main:app",
|
||||
"semantic": "src.api.main:app",
|
||||
"moderator": "src.api.main:app",
|
||||
"identity": "src.api.app:app",
|
||||
},
|
||||
service_types={"processing": "typescript"},
|
||||
)
|
||||
|
||||
|
||||
def get_service_config(service_id: str, environment: str = "dev") -> dict:
|
||||
return _get_service_config(service_id, environment, _WORKSPACE_ROOT, _CONFIG)
|
||||
|
||||
|
||||
def list_services(environment: str = "dev") -> list[str]:
|
||||
return _list_services(environment, _WORKSPACE_ROOT, _CONFIG)
|
||||
Loading…
Add table
Reference in a new issue