Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[System] Pre-populate docker volumes with config files #15

Open
Falcon2k1 opened this issue Mar 31, 2021 · 3 comments
Open

[System] Pre-populate docker volumes with config files #15

Falcon2k1 opened this issue Mar 31, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@Falcon2k1
Copy link

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.

@phntxx
Copy link
Owner

phntxx commented Apr 1, 2021

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

@Falcon2k1
Copy link
Author

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.

@phntxx phntxx changed the title Docker image not pre-populating /data/*.json files + links not clickable? [System] Pre-populate docker volumes with config files Apr 23, 2021
@phntxx phntxx added the enhancement New feature or request label Apr 23, 2021
@KillerTic
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants