summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorAlex Efros <powerman@powerman.name>2024-06-14 19:17:50 +0300
committerGitHub <noreply@github.com>2024-06-14 19:17:50 +0300
commit0c43d1544ffba4fae9d60228fc78bad7e9725869 (patch)
tree1f46c228ff0ab76ec75c7598bb24355f5a1cc1d4 /packaging
parent7450f4d7a121a7243ae5e3b4534a73b556eba2ed (diff)
Fix Caddy setup in Install Netdata with Docker (#17901)
Related to https://github.com/netdata/netdata/issues/17899. Netdata docker-compose setup is updated to match one in "Recommended way" section.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/docker/README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/packaging/docker/README.md b/packaging/docker/README.md
index 146592804a..d0f1597cfd 100644
--- a/packaging/docker/README.md
+++ b/packaging/docker/README.md
@@ -308,7 +308,7 @@ executed internally by the caddy server.
```caddyfile
netdata.example.org {
- reverse_proxy netdata:19999
+ reverse_proxy host.docker.internal:19999
tls admin@example.org
}
```
@@ -318,11 +318,15 @@ netdata.example.org {
After setting Caddyfile run this with `docker-compose up -d` to have a fully functioning Netdata setup behind an HTTP reverse
proxy.
+Make sure Netdata bind to docker0 interface if you've custom `web.bind to` setting in `netdata.conf`.
+
```yaml
version: '3'
services:
caddy:
image: caddy:2
+ extra_hosts:
+ - "host.docker.internal:host-gateway" # To access netdata running with "network_mode: host".
ports:
- "80:80"
- "443:443"
@@ -333,9 +337,9 @@ services:
netdata:
image: netdata/netdata
container_name: netdata
- hostname: example.com # set to fqdn of host
- restart: always
pid: host
+ network_mode: host
+ restart: unless-stopped
cap_add:
- SYS_PTRACE
- SYS_ADMIN