dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

[System] Pre-populate docker volumes with config files

Open Falcon2k1 opened this issue 4 years ago • 3 comments

Using Docker image: phntxx/dashboard:latest, pulled today on an ubuntu server VM.

Hi! I just found this out and it's a pretty cool program, but I ran into some weird behavior that I suspect might be a bug, either with your docker configuration or something else.

For starters, I'm launching the docker container using the following, username swapped out:

version: "3"

services:
  dashboard:
    image: phntxx/dashboard:latest
    container_name: dashboard
    restart: unless-stopped
    volumes:
      - /home/<username>/docker_data/dashboard:/app/data
    ports:
      - 8080:8080

On first launch no files were populated, which was a little confusing but I just grabbed them from the repo and that worked out fine and it started to render.

Not sure if this is intentional; if it is, you should include some additional documentation in the docker readme or here on the github. Other containers I've used tend to pre-populate data if it doesn't exist.

However, after that, there's a second strangeness that's more of a significant issue.

In Chrome and Edge, the dashboard doesn't seem to be making links for any of the apps, just...lines. Viewing developer console shows that they look like : <a class="sc-kstrdz btjemE">pfSense</a> but aren't clickable or anything, leading to either example.com or a real one if filled out correctly.

I reviewed the documentation and I don't see anything I'm missing that would lead to Dashboard just not rendering the links.

Falcon2k1 avatar Mar 31 '21 23:03 Falcon2k1

Hi!

If I understand this correctly there's the following two points:

  • The Docker image does not pre-populate the data-directory

Currently the Docker image does not pre-populate the data-directory. I will look into this, as it sounds like a neat feature.

  • Links aren't clickable

That's actually a bug that will be fixed with the next commit. The issue is that apps.json looks like this by default:

...
{
  "name": "[NAME]",
  "URL": "[URL]",
  "displayURL": "[DISPLAYURL]",
  "icon": "[ICON]"
}
...

however, the app itself expects the key to be url, not URL. Fixing with the next commit

phntxx avatar Apr 01 '21 06:04 phntxx

Yes, you got the two points perfectly. Sorry, I'm not used to Github; in hindsight I should have opened them as separate issues.

For the second point, that's great, since it means I can fix it on my end by editing my .json files. Thanks again.

Falcon2k1 avatar Apr 01 '21 17:04 Falcon2k1

I think it would be great, if all files would be included with some dummy data. Pretty much like the "data" folder here on gitlab. They should show all possible configuration options, maybe include some comments, ...

Makes the start a little easier.

Albirex88 avatar Jan 10 '22 12:01 Albirex88