feat(F.17): add Coolify projects, databases, services — 67 tools total
Add 3 new Coolify plugin handlers (37 new tools, 67 total): - projects.py: 8 tools (CRUD projects + environments) - databases.py: 16 tools (CRUD, lifecycle, 6 DB types, backups) - services.py: 13 tools (CRUD, lifecycle, env vars) 734 tests passing. Total platform tools: 633. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -267,3 +267,163 @@ class CoolifyClient:
|
||||
async def validate_server(self, uuid: str) -> dict:
|
||||
"""Validate server connectivity and configuration."""
|
||||
return await self.request("GET", f"servers/{uuid}/validate")
|
||||
|
||||
# --- Projects ---
|
||||
|
||||
async def list_projects(self) -> list[dict]:
|
||||
"""List all projects."""
|
||||
return await self.request("GET", "projects")
|
||||
|
||||
async def get_project(self, uuid: str) -> dict:
|
||||
"""Get project by UUID."""
|
||||
return await self.request("GET", f"projects/{uuid}")
|
||||
|
||||
async def create_project(self, data: dict) -> dict:
|
||||
"""Create a new project."""
|
||||
return await self.request("POST", "projects", json_data=data)
|
||||
|
||||
async def update_project(self, uuid: str, data: dict) -> dict:
|
||||
"""Update project by UUID."""
|
||||
return await self.request("PATCH", f"projects/{uuid}", json_data=data)
|
||||
|
||||
async def delete_project(self, uuid: str) -> dict:
|
||||
"""Delete project by UUID."""
|
||||
return await self.request("DELETE", f"projects/{uuid}")
|
||||
|
||||
# --- Environments ---
|
||||
|
||||
async def list_environments(self, project_uuid: str) -> list[dict]:
|
||||
"""List environments in a project."""
|
||||
return await self.request("GET", f"projects/{project_uuid}/environments")
|
||||
|
||||
async def get_environment(self, project_uuid: str, environment_name: str) -> dict:
|
||||
"""Get environment by name."""
|
||||
return await self.request("GET", f"projects/{project_uuid}/environments/{environment_name}")
|
||||
|
||||
async def create_environment(self, project_uuid: str, data: dict) -> dict:
|
||||
"""Create environment in a project."""
|
||||
return await self.request("POST", f"projects/{project_uuid}/environments", json_data=data)
|
||||
|
||||
# --- Databases ---
|
||||
|
||||
async def list_databases(self) -> list[dict]:
|
||||
"""List all databases."""
|
||||
return await self.request("GET", "databases")
|
||||
|
||||
async def get_database(self, uuid: str) -> dict:
|
||||
"""Get database by UUID."""
|
||||
return await self.request("GET", f"databases/{uuid}")
|
||||
|
||||
async def update_database(self, uuid: str, data: dict) -> dict:
|
||||
"""Update database by UUID."""
|
||||
return await self.request("PATCH", f"databases/{uuid}", json_data=data)
|
||||
|
||||
async def delete_database(
|
||||
self,
|
||||
uuid: str,
|
||||
delete_configurations: bool = True,
|
||||
delete_volumes: bool = True,
|
||||
docker_cleanup: bool = True,
|
||||
) -> dict:
|
||||
"""Delete database by UUID."""
|
||||
params = {
|
||||
"delete_configurations": str(delete_configurations).lower(),
|
||||
"delete_volumes": str(delete_volumes).lower(),
|
||||
"docker_cleanup": str(docker_cleanup).lower(),
|
||||
}
|
||||
return await self.request("DELETE", f"databases/{uuid}", params=params)
|
||||
|
||||
async def start_database(self, uuid: str) -> dict:
|
||||
"""Start database."""
|
||||
return await self.request("GET", f"databases/{uuid}/start")
|
||||
|
||||
async def stop_database(self, uuid: str) -> dict:
|
||||
"""Stop database."""
|
||||
return await self.request("GET", f"databases/{uuid}/stop")
|
||||
|
||||
async def restart_database(self, uuid: str) -> dict:
|
||||
"""Restart database."""
|
||||
return await self.request("GET", f"databases/{uuid}/restart")
|
||||
|
||||
async def create_database(self, db_type: str, data: dict) -> dict:
|
||||
"""Create a database of given type (postgresql, mysql, mariadb, mongodb, redis, clickhouse)."""
|
||||
return await self.request("POST", f"databases/{db_type}", json_data=data)
|
||||
|
||||
async def get_database_backups(self, uuid: str) -> dict:
|
||||
"""Get database backups."""
|
||||
return await self.request("GET", f"databases/{uuid}/backups")
|
||||
|
||||
async def create_database_backup(self, uuid: str) -> dict:
|
||||
"""Create a manual database backup."""
|
||||
return await self.request("POST", f"databases/{uuid}/backups")
|
||||
|
||||
async def list_backup_executions(self) -> list[dict]:
|
||||
"""List all backup executions."""
|
||||
return await self.request("GET", "databases/backup-executions")
|
||||
|
||||
# --- Services ---
|
||||
|
||||
async def list_services(self) -> list[dict]:
|
||||
"""List all services."""
|
||||
return await self.request("GET", "services")
|
||||
|
||||
async def get_service(self, uuid: str) -> dict:
|
||||
"""Get service by UUID."""
|
||||
return await self.request("GET", f"services/{uuid}")
|
||||
|
||||
async def create_service(self, data: dict) -> dict:
|
||||
"""Create a service from template."""
|
||||
return await self.request("POST", "services", json_data=data)
|
||||
|
||||
async def update_service(self, uuid: str, data: dict) -> dict:
|
||||
"""Update service by UUID."""
|
||||
return await self.request("PATCH", f"services/{uuid}", json_data=data)
|
||||
|
||||
async def delete_service(
|
||||
self,
|
||||
uuid: str,
|
||||
delete_configurations: bool = True,
|
||||
delete_volumes: bool = True,
|
||||
docker_cleanup: bool = True,
|
||||
) -> dict:
|
||||
"""Delete service by UUID."""
|
||||
params = {
|
||||
"delete_configurations": str(delete_configurations).lower(),
|
||||
"delete_volumes": str(delete_volumes).lower(),
|
||||
"docker_cleanup": str(docker_cleanup).lower(),
|
||||
}
|
||||
return await self.request("DELETE", f"services/{uuid}", params=params)
|
||||
|
||||
async def start_service(self, uuid: str) -> dict:
|
||||
"""Start service."""
|
||||
return await self.request("GET", f"services/{uuid}/start")
|
||||
|
||||
async def stop_service(self, uuid: str) -> dict:
|
||||
"""Stop service."""
|
||||
return await self.request("GET", f"services/{uuid}/stop")
|
||||
|
||||
async def restart_service(self, uuid: str) -> dict:
|
||||
"""Restart service."""
|
||||
return await self.request("GET", f"services/{uuid}/restart")
|
||||
|
||||
# --- Service Environment Variables ---
|
||||
|
||||
async def list_service_envs(self, uuid: str) -> list[dict]:
|
||||
"""List service environment variables."""
|
||||
return await self.request("GET", f"services/{uuid}/envs")
|
||||
|
||||
async def create_service_env(self, uuid: str, data: dict) -> dict:
|
||||
"""Create service environment variable."""
|
||||
return await self.request("POST", f"services/{uuid}/envs", json_data=data)
|
||||
|
||||
async def update_service_env(self, uuid: str, data: dict) -> dict:
|
||||
"""Update service environment variable."""
|
||||
return await self.request("PATCH", f"services/{uuid}/envs", json_data=data)
|
||||
|
||||
async def update_service_envs_bulk(self, uuid: str, data: list[dict]) -> dict:
|
||||
"""Bulk update service environment variables."""
|
||||
return await self.request("PATCH", f"services/{uuid}/envs/bulk", json_data={"data": data})
|
||||
|
||||
async def delete_service_env(self, uuid: str, env_uuid: str) -> dict:
|
||||
"""Delete service environment variable."""
|
||||
return await self.request("DELETE", f"services/{uuid}/envs/{env_uuid}")
|
||||
|
||||
@@ -4,10 +4,13 @@ Coolify Plugin Handlers
|
||||
All tool handlers for Coolify operations.
|
||||
"""
|
||||
|
||||
from . import applications, deployments, servers
|
||||
from . import applications, databases, deployments, projects, servers, services
|
||||
|
||||
__all__ = [
|
||||
"applications",
|
||||
"databases",
|
||||
"deployments",
|
||||
"projects",
|
||||
"servers",
|
||||
"services",
|
||||
]
|
||||
|
||||
405
plugins/coolify/handlers/databases.py
Normal file
405
plugins/coolify/handlers/databases.py
Normal file
@@ -0,0 +1,405 @@
|
||||
"""Database Handler — manages Coolify databases, lifecycle, and backups."""
|
||||
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
from plugins.coolify.client import CoolifyClient
|
||||
|
||||
|
||||
def _create_db_spec(db_type: str, description: str) -> dict[str, Any]:
|
||||
"""Generate a create_* tool spec for a database type."""
|
||||
return {
|
||||
"name": f"create_{db_type}",
|
||||
"method_name": f"create_{db_type}",
|
||||
"description": description,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project_uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"server_uuid": {
|
||||
"type": "string",
|
||||
"description": "Server UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"environment_name": {
|
||||
"type": "string",
|
||||
"description": "Environment name (e.g., 'production')",
|
||||
"minLength": 1,
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Database name",
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Database description",
|
||||
},
|
||||
"instant_deploy": {
|
||||
"type": "boolean",
|
||||
"description": "Deploy immediately after creation",
|
||||
"default": False,
|
||||
},
|
||||
},
|
||||
"required": ["project_uuid", "server_uuid", "environment_name"],
|
||||
},
|
||||
"scope": "write",
|
||||
}
|
||||
|
||||
|
||||
def get_tool_specifications() -> list[dict[str, Any]]:
|
||||
"""Return tool specifications for ToolGenerator."""
|
||||
specs = [
|
||||
{
|
||||
"name": "list_databases",
|
||||
"method_name": "list_databases",
|
||||
"description": "List all Coolify databases.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "get_database",
|
||||
"method_name": "get_database",
|
||||
"description": "Get details of a specific Coolify database by UUID.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "update_database",
|
||||
"method_name": "update_database",
|
||||
"description": "Update a Coolify database settings.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Database name",
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Database description",
|
||||
},
|
||||
"image": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Docker image",
|
||||
},
|
||||
"is_public": {
|
||||
"anyOf": [{"type": "boolean"}, {"type": "null"}],
|
||||
"description": "Make database publicly accessible",
|
||||
},
|
||||
"public_port": {
|
||||
"anyOf": [{"type": "integer"}, {"type": "null"}],
|
||||
"description": "Public port number",
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "delete_database",
|
||||
"method_name": "delete_database",
|
||||
"description": (
|
||||
"Delete a Coolify database permanently. "
|
||||
"Optionally clean up volumes and Docker resources."
|
||||
),
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"delete_configurations": {
|
||||
"type": "boolean",
|
||||
"description": "Delete configurations",
|
||||
"default": True,
|
||||
},
|
||||
"delete_volumes": {
|
||||
"type": "boolean",
|
||||
"description": "Delete volumes",
|
||||
"default": True,
|
||||
},
|
||||
"docker_cleanup": {
|
||||
"type": "boolean",
|
||||
"description": "Run Docker cleanup",
|
||||
"default": True,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "admin",
|
||||
},
|
||||
{
|
||||
"name": "start_database",
|
||||
"method_name": "start_database",
|
||||
"description": "Start a Coolify database.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "stop_database",
|
||||
"method_name": "stop_database",
|
||||
"description": "Stop a running Coolify database.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "restart_database",
|
||||
"method_name": "restart_database",
|
||||
"description": "Restart a Coolify database.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
]
|
||||
|
||||
# Add create specs for each database type
|
||||
db_types = [
|
||||
("postgresql", "Create a PostgreSQL database on Coolify."),
|
||||
("mysql", "Create a MySQL database on Coolify."),
|
||||
("mariadb", "Create a MariaDB database on Coolify."),
|
||||
("mongodb", "Create a MongoDB database on Coolify."),
|
||||
("redis", "Create a Redis database on Coolify."),
|
||||
("clickhouse", "Create a ClickHouse database on Coolify."),
|
||||
]
|
||||
for db_type, desc in db_types:
|
||||
specs.append(_create_db_spec(db_type, desc))
|
||||
|
||||
# Backup tools
|
||||
specs.extend(
|
||||
[
|
||||
{
|
||||
"name": "get_database_backups",
|
||||
"method_name": "get_database_backups",
|
||||
"description": "Get backup configuration and history for a Coolify database.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "create_database_backup",
|
||||
"method_name": "create_database_backup",
|
||||
"description": "Create a manual backup of a Coolify database.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Database UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "list_backup_executions",
|
||||
"method_name": "list_backup_executions",
|
||||
"description": "List all backup executions across all databases.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
return specs
|
||||
|
||||
|
||||
# --- Handler Functions ---
|
||||
|
||||
|
||||
async def list_databases(client: CoolifyClient) -> str:
|
||||
"""List all databases."""
|
||||
databases = await client.list_databases()
|
||||
result = {"success": True, "count": len(databases), "databases": databases}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def get_database(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Get database details."""
|
||||
db = await client.get_database(uuid)
|
||||
result = {"success": True, "database": db}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def update_database(client: CoolifyClient, uuid: str, **kwargs) -> str:
|
||||
"""Update database settings."""
|
||||
data = {k: v for k, v in kwargs.items() if v is not None and k != "uuid"}
|
||||
db = await client.update_database(uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Database '{uuid}' updated successfully",
|
||||
"database": db,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def delete_database(
|
||||
client: CoolifyClient,
|
||||
uuid: str,
|
||||
delete_configurations: bool = True,
|
||||
delete_volumes: bool = True,
|
||||
docker_cleanup: bool = True,
|
||||
) -> str:
|
||||
"""Delete a database."""
|
||||
result_data = await client.delete_database(
|
||||
uuid,
|
||||
delete_configurations=delete_configurations,
|
||||
delete_volumes=delete_volumes,
|
||||
docker_cleanup=docker_cleanup,
|
||||
)
|
||||
result = {"success": True, "message": f"Database '{uuid}' deleted", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def start_database(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Start a database."""
|
||||
result_data = await client.start_database(uuid)
|
||||
result = {"success": True, "message": f"Database '{uuid}' starting", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def stop_database(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Stop a database."""
|
||||
result_data = await client.stop_database(uuid)
|
||||
result = {"success": True, "message": f"Database '{uuid}' stopping", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def restart_database(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Restart a database."""
|
||||
result_data = await client.restart_database(uuid)
|
||||
result = {"success": True, "message": f"Database '{uuid}' restarting", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def _create_database(client: CoolifyClient, db_type: str, **kwargs) -> str:
|
||||
"""Create a database of given type."""
|
||||
data = {k: v for k, v in kwargs.items() if v is not None}
|
||||
db = await client.create_database(db_type, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"{db_type.title()} database created successfully",
|
||||
"database": db,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def create_postgresql(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a PostgreSQL database."""
|
||||
return await _create_database(client, "postgresql", **kwargs)
|
||||
|
||||
|
||||
async def create_mysql(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a MySQL database."""
|
||||
return await _create_database(client, "mysql", **kwargs)
|
||||
|
||||
|
||||
async def create_mariadb(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a MariaDB database."""
|
||||
return await _create_database(client, "mariadb", **kwargs)
|
||||
|
||||
|
||||
async def create_mongodb(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a MongoDB database."""
|
||||
return await _create_database(client, "mongodb", **kwargs)
|
||||
|
||||
|
||||
async def create_redis(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a Redis database."""
|
||||
return await _create_database(client, "redis", **kwargs)
|
||||
|
||||
|
||||
async def create_clickhouse(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a ClickHouse database."""
|
||||
return await _create_database(client, "clickhouse", **kwargs)
|
||||
|
||||
|
||||
async def get_database_backups(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Get database backups."""
|
||||
backups = await client.get_database_backups(uuid)
|
||||
result = {"success": True, "backups": backups}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def create_database_backup(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Create a manual database backup."""
|
||||
result_data = await client.create_database_backup(uuid)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Backup created for database '{uuid}'",
|
||||
"data": result_data,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def list_backup_executions(client: CoolifyClient) -> str:
|
||||
"""List all backup executions."""
|
||||
executions = await client.list_backup_executions()
|
||||
result = {"success": True, "count": len(executions), "executions": executions}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
265
plugins/coolify/handlers/projects.py
Normal file
265
plugins/coolify/handlers/projects.py
Normal file
@@ -0,0 +1,265 @@
|
||||
"""Project & Environment Handler — manages Coolify projects and environments."""
|
||||
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
from plugins.coolify.client import CoolifyClient
|
||||
|
||||
|
||||
def get_tool_specifications() -> list[dict[str, Any]]:
|
||||
"""Return tool specifications for ToolGenerator."""
|
||||
return [
|
||||
{
|
||||
"name": "list_projects",
|
||||
"method_name": "list_projects",
|
||||
"description": "List all Coolify projects.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "get_project",
|
||||
"method_name": "get_project",
|
||||
"description": "Get details of a specific Coolify project by UUID.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "create_project",
|
||||
"method_name": "create_project",
|
||||
"description": (
|
||||
"Create a new Coolify project. "
|
||||
"Projects group applications, databases, and services."
|
||||
),
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Project name",
|
||||
"minLength": 1,
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Project description",
|
||||
},
|
||||
},
|
||||
"required": ["name"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "update_project",
|
||||
"method_name": "update_project",
|
||||
"description": "Update a Coolify project name or description.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "New project name",
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "New project description",
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "delete_project",
|
||||
"method_name": "delete_project",
|
||||
"description": (
|
||||
"Delete a Coolify project permanently. "
|
||||
"All resources in the project will be removed."
|
||||
),
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "admin",
|
||||
},
|
||||
{
|
||||
"name": "list_environments",
|
||||
"method_name": "list_environments",
|
||||
"description": "List all environments in a Coolify project.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project_uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["project_uuid"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "get_environment",
|
||||
"method_name": "get_environment",
|
||||
"description": ("Get details of a specific environment in a Coolify project by name."),
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project_uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"environment_name": {
|
||||
"type": "string",
|
||||
"description": "Environment name (e.g., 'production')",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["project_uuid", "environment_name"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "create_environment",
|
||||
"method_name": "create_environment",
|
||||
"description": "Create a new environment in a Coolify project.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project_uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Environment name",
|
||||
"minLength": 1,
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Environment description",
|
||||
},
|
||||
},
|
||||
"required": ["project_uuid", "name"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# --- Handler Functions ---
|
||||
|
||||
|
||||
async def list_projects(client: CoolifyClient) -> str:
|
||||
"""List all projects."""
|
||||
projects = await client.list_projects()
|
||||
result = {"success": True, "count": len(projects), "projects": projects}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def get_project(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Get project details."""
|
||||
project = await client.get_project(uuid)
|
||||
result = {"success": True, "project": project}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def create_project(client: CoolifyClient, name: str, description: str | None = None) -> str:
|
||||
"""Create a new project."""
|
||||
data = {"name": name}
|
||||
if description is not None:
|
||||
data["description"] = description
|
||||
project = await client.create_project(data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": "Project created successfully",
|
||||
"project": project,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def update_project(
|
||||
client: CoolifyClient,
|
||||
uuid: str,
|
||||
name: str | None = None,
|
||||
description: str | None = None,
|
||||
) -> str:
|
||||
"""Update project settings."""
|
||||
data = {}
|
||||
if name is not None:
|
||||
data["name"] = name
|
||||
if description is not None:
|
||||
data["description"] = description
|
||||
project = await client.update_project(uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Project '{uuid}' updated successfully",
|
||||
"project": project,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def delete_project(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Delete a project."""
|
||||
result_data = await client.delete_project(uuid)
|
||||
result = {"success": True, "message": f"Project '{uuid}' deleted", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def list_environments(client: CoolifyClient, project_uuid: str) -> str:
|
||||
"""List environments in a project."""
|
||||
envs = await client.list_environments(project_uuid)
|
||||
result = {"success": True, "count": len(envs), "environments": envs}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def get_environment(client: CoolifyClient, project_uuid: str, environment_name: str) -> str:
|
||||
"""Get environment details."""
|
||||
env = await client.get_environment(project_uuid, environment_name)
|
||||
result = {"success": True, "environment": env}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def create_environment(
|
||||
client: CoolifyClient,
|
||||
project_uuid: str,
|
||||
name: str,
|
||||
description: str | None = None,
|
||||
) -> str:
|
||||
"""Create a new environment in a project."""
|
||||
data = {"name": name}
|
||||
if description is not None:
|
||||
data["description"] = description
|
||||
env = await client.create_environment(project_uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Environment '{name}' created",
|
||||
"environment": env,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
483
plugins/coolify/handlers/services.py
Normal file
483
plugins/coolify/handlers/services.py
Normal file
@@ -0,0 +1,483 @@
|
||||
"""Service Handler — manages Coolify services (Docker Compose), lifecycle, and env vars."""
|
||||
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
from plugins.coolify.client import CoolifyClient
|
||||
|
||||
|
||||
def get_tool_specifications() -> list[dict[str, Any]]:
|
||||
"""Return tool specifications for ToolGenerator."""
|
||||
return [
|
||||
{
|
||||
"name": "list_services",
|
||||
"method_name": "list_services",
|
||||
"description": "List all Coolify services.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "get_service",
|
||||
"method_name": "get_service",
|
||||
"description": "Get details of a specific Coolify service by UUID.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "create_service",
|
||||
"method_name": "create_service",
|
||||
"description": (
|
||||
"Create a Coolify service from a predefined template. "
|
||||
"Requires project_uuid, server_uuid, environment, and service type."
|
||||
),
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project_uuid": {
|
||||
"type": "string",
|
||||
"description": "Project UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"server_uuid": {
|
||||
"type": "string",
|
||||
"description": "Server UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"environment_name": {
|
||||
"type": "string",
|
||||
"description": "Environment name (e.g., 'production')",
|
||||
"minLength": 1,
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": (
|
||||
"Service type from Coolify templates "
|
||||
"(e.g., 'plausible-analytics', 'minio', 'grafana')"
|
||||
),
|
||||
"minLength": 1,
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Service name",
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Service description",
|
||||
},
|
||||
"instant_deploy": {
|
||||
"type": "boolean",
|
||||
"description": "Deploy immediately after creation",
|
||||
"default": False,
|
||||
},
|
||||
},
|
||||
"required": [
|
||||
"project_uuid",
|
||||
"server_uuid",
|
||||
"environment_name",
|
||||
"type",
|
||||
],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "update_service",
|
||||
"method_name": "update_service",
|
||||
"description": "Update a Coolify service settings.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"name": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Service name",
|
||||
},
|
||||
"description": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Service description",
|
||||
},
|
||||
"docker_compose_raw": {
|
||||
"anyOf": [{"type": "string"}, {"type": "null"}],
|
||||
"description": "Raw Docker Compose YAML content",
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "delete_service",
|
||||
"method_name": "delete_service",
|
||||
"description": (
|
||||
"Delete a Coolify service permanently. "
|
||||
"Optionally clean up volumes and Docker resources."
|
||||
),
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"delete_configurations": {
|
||||
"type": "boolean",
|
||||
"description": "Delete configurations",
|
||||
"default": True,
|
||||
},
|
||||
"delete_volumes": {
|
||||
"type": "boolean",
|
||||
"description": "Delete volumes",
|
||||
"default": True,
|
||||
},
|
||||
"docker_cleanup": {
|
||||
"type": "boolean",
|
||||
"description": "Run Docker cleanup",
|
||||
"default": True,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "admin",
|
||||
},
|
||||
{
|
||||
"name": "start_service",
|
||||
"method_name": "start_service",
|
||||
"description": "Start a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "stop_service",
|
||||
"method_name": "stop_service",
|
||||
"description": "Stop a running Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "restart_service",
|
||||
"method_name": "restart_service",
|
||||
"description": "Restart a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "list_service_envs",
|
||||
"method_name": "list_service_envs",
|
||||
"description": "List environment variables for a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid"],
|
||||
},
|
||||
"scope": "read",
|
||||
},
|
||||
{
|
||||
"name": "create_service_env",
|
||||
"method_name": "create_service_env",
|
||||
"description": "Create an environment variable for a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "Environment variable key",
|
||||
"minLength": 1,
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Environment variable value",
|
||||
},
|
||||
"is_preview": {
|
||||
"type": "boolean",
|
||||
"description": "Preview deployment only",
|
||||
"default": False,
|
||||
},
|
||||
},
|
||||
"required": ["uuid", "key", "value"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "update_service_env",
|
||||
"method_name": "update_service_env",
|
||||
"description": "Update an environment variable for a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "Environment variable key",
|
||||
"minLength": 1,
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "New value",
|
||||
},
|
||||
"is_preview": {
|
||||
"anyOf": [{"type": "boolean"}, {"type": "null"}],
|
||||
"description": "Preview deployment only",
|
||||
},
|
||||
},
|
||||
"required": ["uuid", "key", "value"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "update_service_envs_bulk",
|
||||
"method_name": "update_service_envs_bulk",
|
||||
"description": "Bulk update environment variables for a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"data": {
|
||||
"type": "array",
|
||||
"description": "Array of env var objects with key and value",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {"type": "string"},
|
||||
"value": {"type": "string"},
|
||||
"is_preview": {"type": "boolean"},
|
||||
},
|
||||
"required": ["key", "value"],
|
||||
},
|
||||
},
|
||||
},
|
||||
"required": ["uuid", "data"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
{
|
||||
"name": "delete_service_env",
|
||||
"method_name": "delete_service_env",
|
||||
"description": "Delete an environment variable from a Coolify service.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Service UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
"env_uuid": {
|
||||
"type": "string",
|
||||
"description": "Environment variable UUID",
|
||||
"minLength": 1,
|
||||
},
|
||||
},
|
||||
"required": ["uuid", "env_uuid"],
|
||||
},
|
||||
"scope": "write",
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# --- Handler Functions ---
|
||||
|
||||
|
||||
async def list_services(client: CoolifyClient) -> str:
|
||||
"""List all services."""
|
||||
services = await client.list_services()
|
||||
result = {"success": True, "count": len(services), "services": services}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def get_service(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Get service details."""
|
||||
service = await client.get_service(uuid)
|
||||
result = {"success": True, "service": service}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def create_service(client: CoolifyClient, **kwargs) -> str:
|
||||
"""Create a service from template."""
|
||||
data = {k: v for k, v in kwargs.items() if v is not None}
|
||||
service = await client.create_service(data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": "Service created successfully",
|
||||
"service": service,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def update_service(client: CoolifyClient, uuid: str, **kwargs) -> str:
|
||||
"""Update service settings."""
|
||||
data = {k: v for k, v in kwargs.items() if v is not None and k != "uuid"}
|
||||
service = await client.update_service(uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Service '{uuid}' updated successfully",
|
||||
"service": service,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def delete_service(
|
||||
client: CoolifyClient,
|
||||
uuid: str,
|
||||
delete_configurations: bool = True,
|
||||
delete_volumes: bool = True,
|
||||
docker_cleanup: bool = True,
|
||||
) -> str:
|
||||
"""Delete a service."""
|
||||
result_data = await client.delete_service(
|
||||
uuid,
|
||||
delete_configurations=delete_configurations,
|
||||
delete_volumes=delete_volumes,
|
||||
docker_cleanup=docker_cleanup,
|
||||
)
|
||||
result = {"success": True, "message": f"Service '{uuid}' deleted", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def start_service(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Start a service."""
|
||||
result_data = await client.start_service(uuid)
|
||||
result = {"success": True, "message": f"Service '{uuid}' starting", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def stop_service(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Stop a service."""
|
||||
result_data = await client.stop_service(uuid)
|
||||
result = {"success": True, "message": f"Service '{uuid}' stopping", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def restart_service(client: CoolifyClient, uuid: str) -> str:
|
||||
"""Restart a service."""
|
||||
result_data = await client.restart_service(uuid)
|
||||
result = {"success": True, "message": f"Service '{uuid}' restarting", "data": result_data}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def list_service_envs(client: CoolifyClient, uuid: str) -> str:
|
||||
"""List service environment variables."""
|
||||
envs = await client.list_service_envs(uuid)
|
||||
result = {"success": True, "count": len(envs), "envs": envs}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def create_service_env(
|
||||
client: CoolifyClient,
|
||||
uuid: str,
|
||||
key: str,
|
||||
value: str,
|
||||
is_preview: bool = False,
|
||||
) -> str:
|
||||
"""Create service environment variable."""
|
||||
data = {"key": key, "value": value, "is_preview": is_preview}
|
||||
result_data = await client.create_service_env(uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Env var '{key}' created",
|
||||
"data": result_data,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def update_service_env(
|
||||
client: CoolifyClient,
|
||||
uuid: str,
|
||||
key: str,
|
||||
value: str,
|
||||
is_preview: bool | None = None,
|
||||
) -> str:
|
||||
"""Update service environment variable."""
|
||||
data = {"key": key, "value": value}
|
||||
if is_preview is not None:
|
||||
data["is_preview"] = is_preview
|
||||
result_data = await client.update_service_env(uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Env var '{key}' updated",
|
||||
"data": result_data,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def update_service_envs_bulk(client: CoolifyClient, uuid: str, data: list[dict]) -> str:
|
||||
"""Bulk update service environment variables."""
|
||||
result_data = await client.update_service_envs_bulk(uuid, data)
|
||||
result = {
|
||||
"success": True,
|
||||
"message": f"Bulk update {len(data)} env vars",
|
||||
"data": result_data,
|
||||
}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
async def delete_service_env(client: CoolifyClient, uuid: str, env_uuid: str) -> str:
|
||||
"""Delete service environment variable."""
|
||||
await client.delete_service_env(uuid, env_uuid)
|
||||
result = {"success": True, "message": f"Env var '{env_uuid}' deleted"}
|
||||
return json.dumps(result, indent=2, ensure_ascii=False)
|
||||
@@ -18,8 +18,11 @@ class CoolifyPlugin(BasePlugin):
|
||||
|
||||
Provides Coolify deployment management capabilities including:
|
||||
- Application management (CRUD, lifecycle, env vars, logs)
|
||||
- Database management (PostgreSQL, MySQL, MariaDB, MongoDB, Redis, ClickHouse, backups)
|
||||
- Deployment control (list, cancel, deploy by tag/UUID)
|
||||
- Project & environment management (CRUD)
|
||||
- Server management (CRUD, resources, domains, validation)
|
||||
- Service management (CRUD, lifecycle, env vars)
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
@@ -60,8 +63,11 @@ class CoolifyPlugin(BasePlugin):
|
||||
specs = []
|
||||
|
||||
specs.extend(handlers.applications.get_tool_specifications())
|
||||
specs.extend(handlers.databases.get_tool_specifications())
|
||||
specs.extend(handlers.deployments.get_tool_specifications())
|
||||
specs.extend(handlers.projects.get_tool_specifications())
|
||||
specs.extend(handlers.servers.get_tool_specifications())
|
||||
specs.extend(handlers.services.get_tool_specifications())
|
||||
|
||||
return specs
|
||||
|
||||
@@ -77,8 +83,11 @@ class CoolifyPlugin(BasePlugin):
|
||||
"""
|
||||
handler_modules = [
|
||||
handlers.applications,
|
||||
handlers.databases,
|
||||
handlers.deployments,
|
||||
handlers.projects,
|
||||
handlers.servers,
|
||||
handlers.services,
|
||||
]
|
||||
|
||||
for module in handler_modules:
|
||||
|
||||
Reference in New Issue
Block a user