INNER CODE UNIT · Python
AppService
ragapp/ragapp · src/manager/app/services/app.py:13
class AppService:
@classmethod
def fetch_all_service_info(cls, docker_client: DockerClient) -> list[ServiceInfo]:
# Get all RAGapp containers from docker server
containers = ContainerService.fetch_all_ragapp_containers(docker_client)
services = [
ServiceInfo.from_docker_container(container) for container in containers
]
# Validate with persisted app configs
app_configs = AppConfigService.load_all_configs_from_disk()
config_app_names = [config.name for config in app_configs]
# Find orphaned containers (the ones that are in Docker but don't have app configs)
for service in services:
if service.app_name not in config_app_names:
logger.warning(f"Orphaned container: {service.name}")
service.status = "orphaned"
service_names = [service.app_name for service in services]