Changed file permissions for netdata and updated docker compose files for zoneminder, pihole, syncthing and grafana services with ports, volumes and environment variables.
Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>pull/1/head
parent
350b3ec149
commit
f3254d5b79
|
@ -5,9 +5,10 @@
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
owner: 1000
|
owner: 1000
|
||||||
group: 1000
|
group: 1000
|
||||||
mode: '755'
|
mode: '777'
|
||||||
state: directory
|
state: directory
|
||||||
loop:
|
loop:
|
||||||
- "{{ netdata_config }}"
|
- "{{ netdata_config }}"
|
||||||
- "{{ netdata_cache }}"
|
- "{{ netdata_cache }}"
|
||||||
- "{{ netdata_lib }}"
|
- "{{ netdata_lib }}"
|
||||||
|
become: true
|
||||||
|
|
|
@ -24,11 +24,11 @@ services:
|
||||||
stop_grace_period: 45s
|
stop_grace_period: 45s
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
ports:
|
|
||||||
- 80:80
|
|
||||||
networks:
|
networks:
|
||||||
- zoneminder
|
- zoneminder
|
||||||
- net
|
- net
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
volumes:
|
volumes:
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
- "{{ zoneminder_data }}:/data"
|
- "{{ zoneminder_data }}:/data"
|
||||||
|
@ -58,108 +58,100 @@ services:
|
||||||
- "53:53/udp"
|
- "53:53/udp"
|
||||||
- "67:67/udp"
|
- "67:67/udp"
|
||||||
- "8089:80/tcp"
|
- "8089:80/tcp"
|
||||||
|
volumes:
|
||||||
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
- "{{ pihole_pihole }}:/etc/pihole/"
|
||||||
|
- "{{ pihole_dnsmasq }}:/etc/dnsmasq.d/"
|
||||||
environment:
|
environment:
|
||||||
- "WEBPASSWORD={{ vault_aya01_pihole_password }}"
|
- "WEBPASSWORD={{ vault_aya01_pihole_password }}"
|
||||||
- "ServerIP={{aya01_ip}}"
|
- "ServerIP={{aya01_ip}}"
|
||||||
- "INTERFACE=eth0"
|
- "INTERFACE=eth0"
|
||||||
- "DNS1=1.1.1.1"
|
- "DNS1=1.1.1.1"
|
||||||
- "DNS1=1.0.0.1"
|
- "DNS1=1.0.0.1"
|
||||||
volumes:
|
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
|
||||||
- "{{ pihole_pihole }}:/etc/pihole/"
|
|
||||||
- "{{ pihole_dnsmasq }}:/etc/dnsmasq.d/"
|
|
||||||
dns:
|
dns:
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.routers.pihole.rule=Host(`pihole.{{local_domain}}`)"
|
|
||||||
- "traefik.http.routers.pihole.entrypoints=web"
|
|
||||||
- "traefik.http.services.pihole.loadbalancer.server.port=8089"
|
|
||||||
|
|
||||||
syncthing:
|
syncthing:
|
||||||
image: syncthing/syncthing
|
|
||||||
container_name: syncthing
|
container_name: syncthing
|
||||||
hostname: syncthing
|
image: syncthing/syncthing
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
environment:
|
|
||||||
- "PUID={{ puid }}"
|
|
||||||
- "PGID={{ pgid }}"
|
|
||||||
volumes:
|
|
||||||
- "{{syncthing_data}}:/var/syncthing"
|
|
||||||
ports:
|
ports:
|
||||||
- 8384:8384 # Web UI
|
- 8384:8384 # Web UI
|
||||||
- 22000:22000/tcp # TCP file transfers
|
- 22000:22000/tcp # TCP file transfers
|
||||||
- 22000:22000/udp # QUIC file transfers
|
- 22000:22000/udp # QUIC file transfers
|
||||||
- 21027:21027/udp # Receive local discovery broadcasts
|
- 21027:21027/udp # Receive local discovery broadcasts
|
||||||
restart: unless-stopped
|
volumes:
|
||||||
|
- "{{syncthing_data}}:/var/syncthing"
|
||||||
|
environment:
|
||||||
|
- "PUID={{ puid }}"
|
||||||
|
- "PGID={{ pgid }}"
|
||||||
|
hostname: syncthing
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana-oss
|
|
||||||
container_name: grafana
|
container_name: grafana
|
||||||
hostname: grafana
|
image: grafana/grafana-oss
|
||||||
|
restart: unless-stopped
|
||||||
user: "{{ puid }}:{{ pgid }}"
|
user: "{{ puid }}:{{ pgid }}"
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
environment:
|
ports:
|
||||||
- "GF_LOG_MODE=console file"
|
- 3000:3000
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ grafana_data }}:/var/lib/grafana/"
|
- "{{ grafana_data }}:/var/lib/grafana/"
|
||||||
- "{{ grafana_log }}:/var/log/grafana/"
|
- "{{ grafana_log }}:/var/log/grafana/"
|
||||||
ports:
|
environment:
|
||||||
- 3000:3000
|
- "GF_LOG_MODE=console file"
|
||||||
|
hostname: grafana
|
||||||
|
|
||||||
soft-serve:
|
soft-serve:
|
||||||
image: charmcli/soft-serve:latest
|
|
||||||
container_name: soft-serve
|
container_name: soft-serve
|
||||||
|
image: charmcli/soft-serve:latest
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
volumes:
|
|
||||||
- "{{ softserve_data }}:/soft-serve"
|
|
||||||
ports:
|
ports:
|
||||||
- 23231:23231
|
- 23231:23231
|
||||||
restart: unless-stopped
|
volumes:
|
||||||
|
- "{{ softserve_data }}:/soft-serve"
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus
|
|
||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
|
image: prom/prometheus
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
volumes:
|
|
||||||
- "{{ prm_config }}:/etc/prometheus"
|
|
||||||
ports:
|
ports:
|
||||||
- "{{ prm_port }}:9090"
|
- "{{ prm_port }}:9090"
|
||||||
|
volumes:
|
||||||
|
- "{{ prm_config }}:/etc/prometheus"
|
||||||
|
|
||||||
exporter_mikrotik:
|
exporter_mikrotik:
|
||||||
container_name: exporter_mikrotik
|
container_name: exporter_mikrotik
|
||||||
user: "{{ puid }}:{{ pgid }}"
|
|
||||||
image: "nshttpd/mikrotik-exporter:{{ e_mikrotik_version }}"
|
image: "nshttpd/mikrotik-exporter:{{ e_mikrotik_version }}"
|
||||||
|
restart: unless-stopped
|
||||||
|
user: "{{ puid }}:{{ pgid }}"
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
|
ports:
|
||||||
|
- "{{ e_mikrotik_port }}:9436"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ e_mikrotik_config }}:/config"
|
- "{{ e_mikrotik_config }}:/config"
|
||||||
environment:
|
environment:
|
||||||
- "CONFIG_FILE=/config/config.yml"
|
- "CONFIG_FILE=/config/config.yml"
|
||||||
ports:
|
|
||||||
- "{{ e_mikrotik_port }}:9436"
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
netdata:
|
netdata:
|
||||||
image: netdata/netdata
|
|
||||||
container_name: netdata
|
container_name: netdata
|
||||||
hostname: "{{ aya01_host }}"
|
image: netdata/netdata
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
ports:
|
ports:
|
||||||
- "{{netdata_port}}:19999"
|
- "{{netdata_port}}:19999"
|
||||||
restart: unless-stopped
|
|
||||||
cap_add:
|
|
||||||
- SYS_PTRACE
|
|
||||||
security_opt:
|
|
||||||
- apparmor:unconfined
|
|
||||||
volumes:
|
volumes:
|
||||||
- "{{netdata_config}}:/etc/netdata"
|
- "{{netdata_config}}:/etc/netdata"
|
||||||
- "{{netdata_lib}}:/var/lib/netdata"
|
- "{{netdata_lib}}:/var/lib/netdata"
|
||||||
|
@ -169,6 +161,13 @@ services:
|
||||||
- /proc:/host/proc:ro
|
- /proc:/host/proc:ro
|
||||||
- /sys:/host/sys:ro
|
- /sys:/host/sys:ro
|
||||||
- /etc/os-release:/host/etc/os-release:ro
|
- /etc/os-release:/host/etc/os-release:ro
|
||||||
|
environment:
|
||||||
|
- "DO_NOT_TRACK=1"
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
security_opt:
|
||||||
|
- apparmor:unconfined
|
||||||
|
hostname: "{{ aya01_host }}"
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -31,11 +31,16 @@ services:
|
||||||
- "{{ ddns_updater_data }}:/updater/data/"
|
- "{{ ddns_updater_data }}:/updater/data/"
|
||||||
ports:
|
ports:
|
||||||
- 8000:8000/tcp
|
- 8000:8000/tcp
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.homeassistant.rule=Host(`ddns.{{local_domain}}`)"
|
||||||
|
|
||||||
homeassistant:
|
homeassistant:
|
||||||
container_name: homeassistant
|
container_name: homeassistant
|
||||||
image: "ghcr.io/home-assistant/home-assistant:stable"
|
image: "ghcr.io/home-assistant/home-assistant:stable"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
net: {}
|
||||||
volumes:
|
volumes:
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
- "{{ ha_config }}:/config/"
|
- "{{ ha_config }}:/config/"
|
||||||
|
@ -79,7 +84,7 @@ services:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.pihole.rule=Host(`pihole.{{local_domain}}`)"
|
- "traefik.http.routers.pihole.rule=Host(`pipihole.{{local_domain}}`)"
|
||||||
# - "traefik.http.routers.pihole.entrypoints=web"
|
# - "traefik.http.routers.pihole.entrypoints=web"
|
||||||
# - "traefik.http.services.pihole.loadbalancer.server.port=8089"
|
# - "traefik.http.services.pihole.loadbalancer.server.port=8089"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue