H
Homarr15mo ago
csd4ni3l

Dash. widget doesnt work when dash. is in docker or i am doing something wrong

.
29 Replies
csd4ni3l
csd4ni3lOP15mo ago
i have dash. like this in my docker compose where i also have homarr:
dash:
image: mauricenino/dashdot:latest
restart: unless-stopped
privileged: true
ports:
- '6734:3001'
volumes:
- /:/mnt/host:ro
dash:
image: mauricenino/dashdot:latest
restart: unless-stopped
privileged: true
ports:
- '6734:3001'
volumes:
- /:/mnt/host:ro
csd4ni3l
csd4ni3lOP15mo ago
setting it like this doesnt connect
No description
csd4ni3l
csd4ni3lOP15mo ago
setting it internally, does not embed the stats, cause that dns record for dash doesnt exist outside of docker network.
No description
csd4ni3l
csd4ni3lOP15mo ago
No description
csd4ni3l
csd4ni3lOP15mo ago
No description
Manicraft1001
Manicraft100115mo ago
You should set it to the absolute IP address. Both Homarr and your browser must be able to connect Your browser can't connect to localhost nor the internal docker hostname
csd4ni3l
csd4ni3lOP15mo ago
why? port is exposed
dash:
image: mauricenino/dashdot:latest
restart: unless-stopped
privileged: true
ports:
- '6734:3001'
environment:
- DASHDOT_ENABLE_CPU_TEMPS=true
- DASHDOT_ALWAYS_SHOW_PERCENTAGES=true
- DASHDOT_CPU_POLL_INTERVAL=500
- DASHDOT_RAM_POLL_INTERVAL=500
- DASHDOT_NETWORK_POLL_INTERVAL=500
- DASHDOT_SPEED_TEST_INTERVAL=60
volumes:
- /:/mnt/host:ro
dash:
image: mauricenino/dashdot:latest
restart: unless-stopped
privileged: true
ports:
- '6734:3001'
environment:
- DASHDOT_ENABLE_CPU_TEMPS=true
- DASHDOT_ALWAYS_SHOW_PERCENTAGES=true
- DASHDOT_CPU_POLL_INTERVAL=500
- DASHDOT_RAM_POLL_INTERVAL=500
- DASHDOT_NETWORK_POLL_INTERVAL=500
- DASHDOT_SPEED_TEST_INTERVAL=60
volumes:
- /:/mnt/host:ro
Manicraft1001
Manicraft100115mo ago
Because localhost means the local host. The client tries to connect to itself. Unless your running Homarr and Dash. on the same machine as your browser is, this won't work Then just use the IP and port instead of localhost or the internal Docker hostname
csd4ni3l
csd4ni3lOP15mo ago
yes, i am doing exactly that right now, but i will use a raspi later
csd4ni3l
csd4ni3lOP15mo ago
No description
csd4ni3l
csd4ni3lOP15mo ago
No description
csd4ni3l
csd4ni3lOP15mo ago
it works with internal port(the connect), but then fails to embed so it seems like, the connection is done on the backend and not in browser, and embed is done in browser only which is very bad which means its impossible to get this working it would only work if i set a custom dash dns record trying that out
Manicraft1001
Manicraft100115mo ago
No, it would also work if you used the IPv4. But a custom DNS record will work as well
csd4ni3l
csd4ni3lOP15mo ago
so i was right only works with dns because docker compose assigns a whole new network and on that network my ip is a lot different and yes, ipv4 did not work
Manicraft1001
Manicraft100115mo ago
It should. Did you check the log?
csd4ni3l
csd4ni3lOP15mo ago
this does not work
No description
csd4ni3l
csd4ni3lOP15mo ago
this does
csd4ni3l
csd4ni3lOP15mo ago
No description
csd4ni3l
csd4ni3lOP15mo ago
as i said, your backend connects to the ip which is bad
Manicraft1001
Manicraft100115mo ago
No, it won't. Your client doesn't know this hostname
csd4ni3l
csd4ni3lOP15mo ago
(after dns record)
csd4ni3l
csd4ni3lOP15mo ago
adguard home
No description
csd4ni3l
csd4ni3lOP15mo ago
so, the problem is that your backend connects, and finds the ip from docker dns, but for browser to connect, it needs a custom dns record to work from its dns. Backend doesnt connect with ipv4 because docker creates an isolated network for each docker compose setup which cant connect to local ips. Browser could connect to that. Backend: - can connect to docker services. - can't connect to local ipv4 because of network isolation Frontend(Browser): - can't connect to docker services - can connect to local ipv4 because its on the router
Manicraft1001
Manicraft100115mo ago
Yes, that is true, if you use network isolation.
csd4ni3l
csd4ni3lOP15mo ago
yes, docker compose does that by default. just wanted to say that you should point that out in docs if its not already
Manicraft1001
Manicraft100115mo ago
You can add it yourself: https://github.com/ajnart/homarr-docs
GitHub
GitHub - ajnart/homarr-docs: The documentation of Homarr
The documentation of Homarr. Contribute to ajnart/homarr-docs development by creating an account on GitHub.
csd4ni3l
csd4ni3lOP15mo ago
is this enough in installation?
<font color="red">**WARNING:** Docker Compose uses an isolated network. Widgets like Dash only work with custom DNS records if both services are in Docker Compose.</font>
<font color="red">**WARNING:** Docker Compose uses an isolated network. Widgets like Dash only work with custom DNS records if both services are in Docker Compose.</font>
Manicraft1001
Manicraft100115mo ago
Just create a pull request and we'll give feedback there
csd4ni3l
csd4ni3lOP15mo ago
oh, and also, iframe is done correctly that one doesnt wanna connect internally
Want results from more Discord servers?
Add your server