|
|
Line 277: |
Line 277: |
| |style="padding: 10px 0px 30px 15px;"|The module addon is the central place for all administrative setup and management. | | |style="padding: 10px 0px 30px 15px;"|The module addon is the central place for all administrative setup and management. |
| Here, you can register products supported by the module, manage Docker templates, and access various utilities such as the media library, translation manager, and module logs. | | Here, you can register products supported by the module, manage Docker templates, and access various utilities such as the media library, translation manager, and module logs. |
− | |}
| |
− | ===App Templates===
| |
− | {|
| |
− | |style="padding: 10px 0px 5px 15px;"|The '''App Templates''' section allows you to manage Docker-based applications that clients can deploy to their containers or stacks directly from the client area.<br/>
| |
− | Templates are divided into two types, available under separate tabs: '''Container Applications''' and '''Stack Applications'''.<br/>
| |
− | Use the interface to import, edit, group, and assign application templates to products.
| |
− | |}
| |
− | ====Applications====
| |
− | {|
| |
− | |style="padding: 10px 0px 15px 15px;"|Before using App Templates, please review the built-in guide accessible from the '''Additional Actions''' button → '''Options''' → '''Collapse Guide'''.<br/>
| |
− | This section allows you to load available templates from your connected Portainer environment and manage them from within WHMCS.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_22.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 15px;"|Switch between available categories: Container Applications or Stack Applications using the tabs at the top.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_23.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 15px;"|Click the refresh icon to import or update the list of templates from Portainer.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_24.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|Once templates are imported, you can use action buttons to edit, duplicate, or delete them. Mass actions are also available for bulk management.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 30px 25px;"|[[File:PDC_25.png]]
| |
− | |}
| |
− |
| |
− | ====Groups====
| |
− | {|
| |
− | |style="padding: 10px 0px 15px 15px;"|With the templates ready, all that is left is to gather them into groups and include said groups into products.<br/>
| |
− | Navigate to '' 'App Templates' '' → '' 'Groups' '' and click on the '' 'Create' '' button.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_26.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|Read the information, then provide the group with:
| |
− | *Name
| |
− | *Description
| |
− | *Items to include
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_27.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|You can use the action button and the mass action function to edit and delete template groups.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_27.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 15px;"|To make application templates available to clients, assign a group in the product’s '''App Templates Configuration''' section using the '''Default Application Group''' setting.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_28.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|Ensure the '''App Templates''' feature is enabled under '''Client Area Features''' for that product.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 30px 25px;"|[[File:PDC_29.png]]
| |
− | |}
| |
− | ====Advanced Configuration====
| |
− | {|
| |
− | |style="padding: 10px 0px 5px 15px;"|'''Advanced configuration of App Templates allows in-depth management of your container and stack application templates.
| |
− | Admins can manually create and edit applications, define their runtime behavior, set default values, and customize input fields using setting details.
| |
− | See the examples below to understand the most important options.
| |
− | |}
| |
− | =====Manually Adding Applications=====
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|You can add individual container or stack applications manually without syncing all templates from Portainer.<br/>
| |
− | 1. Navigate to '''App Templates''' → '''Applications''', then click '''Create''' to add a new template.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_30.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 5px 15px;"|2. Fill in the basic details, such as:
| |
− | * '''Name''' – Display name for the application (e.g., Caddy, Redis).
| |
− | * '''Description''' – Optional. Short info about what the application does.
| |
− | * '''Status''' – Set to "Active" if the template should be available for use.
| |
− | * '''Image''' – Docker image used to deploy this template (e.g., `caddy:latest`).
| |
− | Click '''Submit''' to save.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 30px 25px;"|[[File:PDC_31.png]]
| |
− | |}
| |
− | =====Defining Application Settings=====
| |
− | {|
| |
− | |style="padding: 10px 0px 15px 15px;"|
| |
− | After saving, go to the '''Setting Details''' panel to configure how the template behaves during deployment.
| |
− | Click '''Create''' or use the pencil icon to edit an existing setting.
| |
− | |}
| |
− |
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_32.png]]
| |
− | |}
| |
− |
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|
| |
− | When editing or adding a setting, you'll need to define:
| |
− | * '''Name''' – Internal identifier (e.g., `template_id`, `terminal_command`, `labels`)
| |
− | * '''Field Type''' – Defines how the field will appear (Text, Select, etc.)
| |
− | * '''Default Value''' – Used as the base value passed to Portainer
| |
− | * '''Validation''' – Optional. Laravel-style validation rules (e.g., `required`)
| |
− | * '''Visibility''' – If enabled, clients will see and can edit this field in the client area
| |
− | |}
| |
− |
| |
− | {|
| |
− | |style="padding: 0px 0px 30px 25px;"|[[File:PDC_33.png]]
| |
− | |}
| |
− |
| |
− | =====Scripting Support (Optional)=====
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|You can inject startup scripts or configuration commands during container deployment via a dedicated setting.
| |
− | This is useful for automated setup of services or software in the container.
| |
− | Use Smarty variables (e.g., `{$service.domain}`, `{$password}`) for dynamic content.
| |
− | To make the script editable by clients, enable the '''Visibility''' toggle.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_34.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 15px 15px;"|See the list below to learn how to set up the setting.
| |
− | *'''Name''' - do not change this value, this is the setting identifier.
| |
− | *'''Field Type''' - if the '' 'Visibility' '' setting is toggled on, this field decides the type of field, we recommend leaving it as is.
| |
− | *'''Default Value''' - this is where you include your script. If '' 'Visibility' '' is toggled on, this will be the default value that clients can modify.<br/>'''''Note:''' Use the merge field list on the right for reference.''
| |
− | *'''Validation''' - optionally, provide [https://laravel.com/docs/11.x/validation#available-validation-rules Laravel validation rules] like '' 'required'.''
| |
− | *'''Visibility''' - this will allow the client to modify the script before installation.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:PDC_35.png]]
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 20px 15px;"|If visibility is enabled, the script input will appear before deployment.
| |
− | If disabled, the script will still execute, but the client won't see or modify it.
| |
− | |}
| |
− | {|
| |
− | |style="padding: 0px 0px 30px 25px;"|[[File:PDC_36.png]]
| |
| |} | | |} |
| ===Traefik Integration=== | | ===Traefik Integration=== |