freedomtech-hosting/polydock-app-amazeeio-generic
最新稳定版本:v0.1.11
Composer 安装命令:
composer require freedomtech-hosting/polydock-app-amazeeio-generic
包简介
Polydock App - amazee.io Generic
README 文档
README
A PHP library providing generic Lagoon application implementations for Polydock. This package includes base classes for deploying and managing applications on the amazee.io Lagoon platform.
Classes
PolydockApp
The base class for generic Lagoon applications. Implements the full Polydock lifecycle for creating, deploying, upgrading, and removing applications on Lagoon.
use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockApp; #[PolydockAppTitle('Generic Lagoon App')] class PolydockApp extends PolydockAppBase
Features:
- Full lifecycle management (create, deploy, upgrade, remove)
- Lagoon API integration
- Health monitoring
- Instance claiming
PolydockAiApp
Extends PolydockApp with AI infrastructure support. Use this as a base class for applications that require AI backend services.
use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockAiApp; #[PolydockAppTitle('Generic Lagoon AI App')] #[PolydockAppStoreFields] class PolydockAiApp extends PolydockApp implements HasStoreAppFormFields
Features:
- Everything from
PolydockApp - AI backend client integration
- Custom Store App form fields support
- Encrypted field storage
Extending
Basic Extension
<?php namespace MyVendor\MyApp; use FreedomtechHosting\PolydockApp\Attributes\PolydockAppTitle; use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockApp; #[PolydockAppTitle('My Custom App')] class MyCustomApp extends PolydockApp { public static string $version = '1.0.0'; public static function getAppVersion(): string { return self::$version; } // Override lifecycle methods as needed public function postDeployAppInstance($appInstance) { $appInstance = parent::postDeployAppInstance($appInstance); // Custom post-deploy logic $this->info('Custom deployment complete'); return $appInstance; } }
AI App with Custom Form Fields
<?php namespace MyVendor\MyAiApp; use Filament\Forms; use FreedomtechHosting\PolydockApp\Attributes\PolydockAppTitle; use FreedomtechHosting\PolydockApp\Attributes\PolydockAppStoreFields; use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockAiApp; #[PolydockAppTitle('My AI App')] #[PolydockAppStoreFields] class MyAiApp extends PolydockAiApp { public static function getStoreAppFormSchema(): array { return [ Forms\Components\Section::make('AI Configuration') ->schema([ Forms\Components\TextInput::make('api_endpoint') ->url() ->required(), Forms\Components\TextInput::make('api_key') ->password() ->extraAttributes(['encrypted' => true]), ]), ]; } public static function getStoreAppInfolistSchema(): array { return [ // Infolist components for the View page ]; } }
Additional Documentation
统计信息
- 总下载量: 1.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-26