Add a "default_value" to the Environment Object of Rockon conf file

So, the current Environment Object schema looks like this:

{
  "description": "<Detailed description. Eg: Login username for Syncthing UI>",
  "label": "Web-UI username",
  (optional)"index": <integer: 1 or above. order of this environment variable, if relevant>
}

And I propose the following schema:

{
  "description": "<Detailed description. Eg: Login username for Syncthing UI>",
  "label": "Web-UI username",
  (optional)"default_value": <string: arbitrary value. suggested default value of this environment variable, if relevant>
  (optional)"index": <integer: 1 or above. order of this environment variable, if relevant>
}

Why?
I am currently trying to add a new Rockon to the registry: GitHub - mbentley/docker-omada-controller: Docker image to run TP-Link Omada Controller

Here the author mentions some caveats when configuring.
For example: the ports in the Ports section must be the same as the ones in the Environment section.

If possible, I’d like to offer the end-user the default values, so that the user doesn’t need to get confused by the fact that port values need to be entered twice.

In this sshot, I have entered the values manually:

3 Likes

I like this one. This way you can provision Rockons with Environment variables by default. Some applications (for example: DroneIO) rely heavily on Environmental Variables to function.

1 Like

Hi @aremiaskfa,
Thanks a lot for your detailed feedback, always a pleasure to see that :slight_smile:.

@stitch10925, thank you for your feedback as well.

I too, agree with both of you and think that it would be an important improvement overall. This was also a feature brought up by @magicalyak that we unfortunately had to leave unattended for too long now :frowning:; see below:
https://github.com/rockstor/rockstor-core/issues/2012

This issue is also somewhat related and linked to another improvement: being able to make env configuration optional…
https://github.com/rockstor/rockstor-core/issues/2094
(see also issue #2280)
… that originated from one of @Hooverdan’s ideas:

A lot to improve here and a lot of backlog, unfortunately. Now that we’re getting closer to having our next Stable release situated, though (see First Stable Poetry build Milestone · GitHub), I am hopeful we will be able to spend more effort on such changes that require some database alteration(s).

Let us know if any of you is interested in having a go at those and we’ll do all we can to assist/support along the way, of course!

3 Likes