Last active
December 31, 2023 15:42
-
-
Save brettinternet/57fb6dc3a656a407e05348c87398fd96 to your computer and use it in GitHub Desktop.
Local netdata utility at http://netdata.localhost:8080
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
name: utils | |
x-options: &options | |
environment: &environment | |
TZ: "${TIMEZONE}" | |
restart: unless-stopped | |
networks: | |
- utils | |
networks: | |
utils: | |
ipam: | |
driver: default | |
config: | |
- subnet: 192.168.0.0/24 | |
services: | |
traefik: | |
<<: *options | |
image: traefik:v2.10 | |
container_name: traefik | |
depends_on: [socket-proxy] | |
command: | |
- --log.level=INFO | |
- --api.insecure=true | |
- --providers.docker=true | |
- --providers.docker.endpoint=tcp://socket-proxy:2375 | |
- --providers.docker.exposedbydefault=false | |
- --providers.docker.network=utils | |
- --entrypoints.web.address=:80 | |
ports: | |
- 8080:80 | |
labels: | |
traefik.enable: true | |
traefik.http.routers.traefik.rule: Host(`traefik.localhost`) | |
traefik.http.routers.traefik.service: api@internal | |
traefik.http.routers.traefik.entrypoints: web | |
traefik.http.services.traefik-service.loadbalancer.server.port: 8080 | |
com.centurylinklabs.watchtower.enable: true | |
netdata: | |
<<: *options | |
image: netdata/netdata | |
container_name: netdata | |
hostname: "${HOSTNAME}" | |
depends_on: [socket-proxy] | |
cap_add: | |
- SYS_PTRACE | |
- SYS_ADMIN | |
environment: | |
<<: *environment | |
DOCKER_HOST: tcp://socket-proxy:2375 | |
volumes: | |
- /etc/passwd:/host/etc/passwd:ro | |
- /etc/group:/host/etc/group:ro | |
- /etc/localtime:/etc/localtime:ro | |
- /proc:/host/proc:ro | |
- /sys:/host/sys:ro | |
- /etc/os-release:/host/etc/os-release:ro | |
- /var/log:/host/var/log:ro | |
labels: | |
traefik.enable: true | |
traefik.http.routers.netdata.rule: Host(`netdata.localhost`) | |
traefik.http.routers.netdata.entrypoints: web | |
traefik.http.services.netdata.loadbalancer.server.port: 19999 | |
com.centurylinklabs.watchtower.enable: true | |
socket-proxy: | |
<<: *options | |
image: tecnativa/docker-socket-proxy:latest | |
container_name: socket-proxy | |
depends_on: [watchtower] | |
environment: | |
<<: *environment | |
CONTAINERS: 1 | |
IMAGES: 1 | |
NETWORKS: 1 | |
CONTAINERS_CREATE: 1 | |
CONTAINERS_START: 1 | |
CONTAINERS_UPDATE: 1 | |
CONTAINERS_DELETE: 1 | |
IMAGES_DELETE: 1 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
watchtower: | |
<<: *options | |
image: containrrr/watchtower | |
container_name: watchtower | |
environment: | |
<<: *environment | |
DOCKER_HOST: tcp://socket-proxy:2375 | |
WATCHTOWER_SCHEDULE: 0 0 13 * * * | |
WATCHTOWER_CLEANUP: "true" | |
WATCHTOWER_LABEL_ENABLE: "true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment