Creating custom apps with Docker Compose yaml - questions and remarks on the UX

ello everyone,

I’m new to TrueNAS Scale and am currently testing it out to see if I can replace the QNAP OS with TrueNAS Scale on my QNAP TS-253D. I have a few containers running on my QNAP NAS and am in the process of moving them to TrueNAS. I have a couple of questions that I hope you can help me with.

As part of my experimentation, I launched an nginx demo with the following YAML configuration. For simplicity, I did not use any volumes; it was just a demo to have something running:

yaml

services:
  nginx:
    image: nginx
    ports:
      - 8080:80

It started fine and is available on port 8080 as expected.

However, I made a mistake and attempted to use port 8080 on another container while the demo was running. As expected, it failed and I was presented with a popup with the following text:

[EFAULT] Failed 'up' action for 'nginx-demo2' app. Please check /var/log/app_lifecycle.log for more details

The ‘More info’ in the popup didn’t contain any clues as to why it failed, so I had to check the /var/log/app_lifecycle.log to see the details. To do this, I opened a shell, used sudo access, and ran tail -f /var/log/app_lifecycle.log to get the content printed while experimenting. Here’s the error I found:

Error response from daemon: driver failed programming external connectivity on endpoint ix-nginx-demo2-nginx-1 (ef43f87655f658ec8c4163e29d2bf3af600d3b27dd68c600dbdbb491caf75258): Bind for 0.0.0.0:8080 failed: port is already allocated

This points straight to the root cause of the issue. It got me thinking if this error message could be included in the ‘More info’ section of the popup to make troubleshooting easier. The UX would be a bit nicer.

On another note, I really like the way the official app instances’ configuration can be altered in the UI. However, when launching an app with Docker Compose YAML, I was not able to retrieve the YAML used to launch the custom app. Is it available somewhere while editing the configuration? Most probably, I’m missing something here.

2 Likes

The first time you create a given custom app you’ll need to reload the browser to see the yaml in the little editor window. Any time you change the yaml in that same window you’ll have to refresh your browser to see the current version / your changes.

1 Like

Thank you very much for the response. I can see the YAML once the page is reloaded.

Is there a plan to enable dynamic updates without needing to reload the page? It would enhance the user experience, making it slightly more pleasant.