Skip to main content

Kompletní příklady

Příklad 1: Interní otevření WebUI — aplikace Časovač

Přehled aplikace:

  • ID: tmrtimer
  • Typ: Deb aplikace / interní otevření WebUI (iframe)
  • Běhové prostředí: služba Python3 HTTP (režim Unix Socket)
  • Frontend: statická HTML stránka časovače

Struktura adresářů:

/usr/local/tmrtimer/
├── config.ini
├── tmrtimer.lang
├── webui.bz2
├── images/
│ └── icons/
│ └── tmrtimer.svg
└── init.d/
└── tmrtimer.service

config.ini:

{
"id": "tmrtimer",
"icon": "/images/icons/tmrtimer.svg",
"exec": true,
"version": "1.0.0",
"category": ["Utilities"],
"platform": "x86_64",
"system_id": "tmrtimer",
"package": "tmrtimer",
"application_type": "deb",
"path": "/tmrtimer/",
"type": "iframe",
"resize": true,
"maxmin": true
}

DEBIAN/control:

Package: tmrtimer
Version: 1.0.0
Architecture: amd64
Section: utils
Priority: optional
Maintainer: ljw <ljw@example.com>
Depends: python3 (>= 3.10), systemd
Description: Timer application
A simple timer tool supporting start, pause, and reset functionality.

Příklad 2: Externí otevření WebUI — aplikace Počasí

Přehled aplikace:

  • ID: weather
  • Typ: Deb aplikace / externí otevření WebUI (nová karta)
  • Běhové prostředí: backendová služba Go, port 16688
  • Frontend: statická stránka počasí

Struktura adresářů:

/usr/local/weather/
├── config.ini
├── bin/
│ └── weather # Go binary
├── weather.lang
├── webui.bz2
├── images/
│ └── icons/
│ └── weather.svg
├── nginx/
│ └── weather.conf
└── init.d/
└── weather-system.service

config.ini:

{
"id": "weather",
"icon": "/images/icons/weather.svg",
"exec": true,
"version": "1.0.001",
"category": ["Utilities"],
"platform": "x86_64",
"system_id": "weather-system",
"package": "weather-package",
"application_type": "deb",
"path": "/weather/",
"open_path": true
}

nginx/weather.conf:

location /weather/ {
proxy_pass http://127.0.0.1:16688/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

Příklad 3: Služba bez UI — služba synchronizace dat

Přehled aplikace:

  • ID: datasync
  • Typ: Deb aplikace / služba bez UI
  • Běhové prostředí: backendová služba Python3 na pozadí

Struktura adresářů:

/usr/local/datasync/
├── config.ini
├── bin/
│ └── datasync # Executable
├── datasync.lang
├── images/
│ └── icons/
│ └── datasync.svg
└── init.d/
└── datasync.service

config.ini:

{
"id": "datasync",
"icon": "/images/icons/datasync.svg",
"exec": true,
"version": "1.0.0",
"category": ["Utilities"],
"platform": "x86_64",
"system_id": "datasync",
"package": "datasync",
"application_type": "deb"
}