Make the folder templates/<slug>/. The slug has lower case letters, digits and hyphens (open-webui). The folder has three files and no other file:
template.jsondocker-compose.ymllogo.svgorlogo.png
schema/template.schema.json has each field and its rule. An editor that reads JSON Schema shows the rules when you type.
slug: the name of the folder.version: the version of the template, not of the app. Start at1.0.0.category: one of the categories of the schema. To add a category, change the schema in the same pull request.summary: one line for the card.description: two or three sentences, what the app does and who it is for.licenceandlicence_note: the licence of the app, and what it means for a customer who hosts it.memory_mb: themem_limitof the services together, in MB.cpuanddisk_gb: what the app needs at least.domain_serviceanddomain_port: the service and the port that the domain of the app goes to.settings: the values that the person types at the create (an admin email, for example).ruleistext,emailorurl.secret: truesaves the value as a secret.secrets: the values that FlyWP makes at the create.kindispassword,hex-32,base64-32orbase64-64.url_setting: the variable that gets the address of the app (https://<domain>).host_setting: the variable that gets the domain. Usenullwhen the app does not need it.website: the address of the project. It starts withhttps://.whats_new: what this version of the template changes. FlyWP shows it with the update.first_steps: what the person does when the app runs. Say who becomes the admin and where the password is.security:truewhen this version fixes a security problem. FlyWP shows its update in red.
- Give each image an exact version tag (
ghost:5.116.0). Do not uselatest,main,masterorstable. - Give each service a
mem_limitin MB (512m). - Use only named volumes (
data:/var/lib/data). Do not mount a folder or a file of the server. A FlyWP backup copies the named volumes. - Write each variable as
${NAME}, with no default value. Each variable is a setting, a secret,url_settingorhost_settingoftemplate.json, and each of them is in the file. - Write each literal
$as$$. Compose reads a single$as a variable. - Put the port of the domain in the
exposeof its service. FlyWP connects the domain. You do not publish a port of the server.
FlyWP adds the rest to each service: the HTTPS entry, a private network, a restart rule, limits, labels and log rotation. FlyWP also runs its safety check on the file. A template that fails it does not show in FlyWP.
logo.svgorlogo.png, at most 100 KB.- An SVG has no script, no event attribute (
onload) and no link to another address. - Use the logo of the project, as the project lets others use it.
- Make
versionhigher:1.0.1for a fix,1.1.0for a new version of the app,2.0.0for a change that the person must do something for. - Write the change in
whats_new. - The apps that run this template get the update offer in FlyWP. The person chooses when to update.
- Run
php bin/check.php --docker. - Make an app from your file on a FlyWP server: "Paste a file" on the create page. Do the
first_steps. - Fill in the checklist of the pull request.
Remove its folder. The apps that run it keep running, and they get no update.