Problem/Justification
There is no way to add portal links when adding apps via YAML file.
Impact
It would be nice to have portal buttons when apps are configured via YAML file.
User Story
I like the YAML configuration very much because I deploy and change apps much faster as when using the wizard and I can also group apps with dependencies together. Because of this I would like to migrate all my apps to YAML but I would also like to keep the portal link buttons for each application.
I just found out that it works if the x-portal entry is added when creating the new app. If it is added afterwards when editing the app it does not work.
I was also able to add an icon to the custom apps by directly editing the metadata.yaml. You just have to edit and save the app again and then the icon appears.
Sorry if there are any errors because I use Google Translate (I speak French).
Hello, I am very interested in what you have managed to do. Can you publish as an example a yaml code for jellyfin with WEBUI portal and adding an icon. This is much clearer I think. Thanks in advance
After creating the app edit the /mnt/.ix-apps/app_configs/jellyfin/metadata.yaml file in the Truenas Shell (File is not shared) and add the icon line like this:
custom_app: true
human_version: 1.0.0_custom
metadata:
app_version: custom
capabilities: []
description: This is a custom app where user can use his/her own docker compose
file for deploying services
home: ''
host_mounts: []
icon: https://static-00.iconduck.com/assets.00/jellyfin-icon-2048x2048-tf5ztk6m.png
maintainers: []
name: custom-app
run_as_context: []
sources: []
title: Custom App
train: stable
version: 1.0.0
migrated: false
notes: null
portals:
Jellyfin: http://HOSTIP:8096/
version: 1.0.0
Just replace TIMEZONE, HOSTPATH and HOSTIP for your country and system. After that save the app in the UI again and the icon should show up.
Hello, thank you for your response. I did as you explained and it is OK for the web portal. But the icon does not appear unfortunately. I have rebooted container and PC but without success.
Well, a week later, logged into Scale to check for app updates⌠both the icon I added and the web ui button showed up.
Update:
I was switching out how some of my custom compose apps and replacing one of the community ones, when I did the install of the first one, icons & web ui showed up for the previous one(s). But the last app I migrated did not.
Must be something to do with middlewared refreshing after an app update/deletion/change/creation?
I kept digging - and it looks as if the middlewared flow is as follows:
Initialization of app (enter the compose YAML syntax)
Create:
/mnt/.ix-apps/app_config/<app-name> structure:
metadata.yml
versions
1.0.0
README.md
app.yaml
user_config.yaml
Update:
/mnt/.ix-apps/metadata.yaml
/mnt/.ix-apps/user_config.yaml
Then, when itâs time to render, it reads /mnt/.ix-apps/metadata.yaml and generates the Web UI.
Saving changes to notes, portals and/or metadata -> icon in the /mnt/.ix-apps/metadata.yaml and then refreshing the browser page, the changes appear immediately.
I started with the following test app, hoping it will show up in the UI:
services:
a-link:
healthcheck:
disable: True
image: tianon/sleeping-beauty
restart: unless-stopped
x-portals:
- name: Open
host: example.com
#port: <optional port #>
path: /
schema: https
x-metadata:
icon: https://media.sys.truenas.net/apps/storj/icons/icon.svg
x-notes: &|
# Link
some description
This didnât show up. I then manually entered into /mnt/.ix-apps/metadata.yaml the missing entries (making sure to remove the x- prefix), refreshed and got the UI I was expecting.
It looks like user_config.yaml files are the raw input, and metadata.yaml is the âmiddlwared ready dataâ version of it, unsure when user_config.yaml is parsed though. Clearly, re-editing the yaml in the UI doesnât affect the metadata.
Iâll keep playing with this, and if I find anything interesting - Iâll share.