mirror of
https://github.com/netdata/netdata.git
synced 2025-04-12 16:58:10 +00:00
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.
This commit is contained in:
parent
7450f4d7a1
commit
0c43d1544f
1 changed files with 7 additions and 3 deletions
|
@ -308,7 +308,7 @@ executed internally by the caddy server.
|
||||||
|
|
||||||
```caddyfile
|
```caddyfile
|
||||||
netdata.example.org {
|
netdata.example.org {
|
||||||
reverse_proxy netdata:19999
|
reverse_proxy host.docker.internal:19999
|
||||||
tls admin@example.org
|
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
|
After setting Caddyfile run this with `docker-compose up -d` to have a fully functioning Netdata setup behind an HTTP reverse
|
||||||
proxy.
|
proxy.
|
||||||
|
|
||||||
|
Make sure Netdata bind to docker0 interface if you've custom `web.bind to` setting in `netdata.conf`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:2
|
image: caddy:2
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway" # To access netdata running with "network_mode: host".
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
@ -333,9 +337,9 @@ services:
|
||||||
netdata:
|
netdata:
|
||||||
image: netdata/netdata
|
image: netdata/netdata
|
||||||
container_name: netdata
|
container_name: netdata
|
||||||
hostname: example.com # set to fqdn of host
|
|
||||||
restart: always
|
|
||||||
pid: host
|
pid: host
|
||||||
|
network_mode: host
|
||||||
|
restart: unless-stopped
|
||||||
cap_add:
|
cap_add:
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
- SYS_ADMIN
|
- SYS_ADMIN
|
||||||
|
|
Loading…
Add table
Reference in a new issue