Move watchtower to monitoring stack. Cleanup APC image.
This commit is contained in:
@@ -5,16 +5,6 @@ RUN apk add --no-cache libusb apcupsd apcupsd-doc apcupsd-webif apache2
|
||||
|
||||
COPY apache2.conf /etc/apache2/httpd.conf
|
||||
COPY apc-deamon.conf /etc/apcupsd/apcupsd.conf
|
||||
# COPY dockerrun.sh /entrypoint/run.sh
|
||||
|
||||
# RUN [ "/sbin/apcupsd" ]
|
||||
#RUN /usr/bin/fcgiwrap -f -s unix:/var/run/fcgiwrap.socket & sleep 1
|
||||
#RUN [ "chown", "nginx:nginx", "/var/run/fcgiwrap.socket" ]
|
||||
# RUN [ "nginx", "-g", "daemon off;" ]
|
||||
|
||||
# RUN chmod +x /entrypoint/run.sh
|
||||
|
||||
VOLUME [ "/etc/apcupsd" ]
|
||||
|
||||
EXPOSE 80 3551/tcp 3551/udp
|
||||
|
||||
|
||||
@@ -3,40 +3,29 @@ version: "3.9"
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
external: true
|
||||
monitoring:
|
||||
name: monitoring
|
||||
external: false
|
||||
|
||||
volumes:
|
||||
netdataconfig:
|
||||
name: netdataconfig
|
||||
netdatalib:
|
||||
name: netdatalib
|
||||
netdatacache:
|
||||
name: netdatacache
|
||||
apc:
|
||||
name: apc
|
||||
telegraf:
|
||||
name: telegraf
|
||||
influxdb:
|
||||
name: influxdb
|
||||
prometheus-config:
|
||||
name: prometheus-config
|
||||
grafana-data:
|
||||
name: grafana-data
|
||||
influx:
|
||||
name: influx
|
||||
influx-etc:
|
||||
name: influx-etc
|
||||
|
||||
services:
|
||||
apc:
|
||||
build: .
|
||||
container_name: apc
|
||||
hostname: apc.lan
|
||||
hostname: apc
|
||||
tty: true
|
||||
devices:
|
||||
- /dev/usb/hiddev0
|
||||
volumes:
|
||||
- apc:/etc/apcupsd
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
- monitoring
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.apc.rule=Host(`apc.lan`)"
|
||||
@@ -51,8 +40,9 @@ services:
|
||||
telegraf:
|
||||
image: telegraf:alpine
|
||||
container_name: telegraf
|
||||
hostname: telegraf
|
||||
networks:
|
||||
- internal
|
||||
- monitoring
|
||||
user: telegraf:998
|
||||
volumes:
|
||||
- telegraf:/etc/telegraf/
|
||||
@@ -60,15 +50,16 @@ services:
|
||||
depends_on:
|
||||
- influxdb
|
||||
|
||||
influxdb:
|
||||
influx:
|
||||
image: influxdb:alpine
|
||||
container_name: influxdb
|
||||
env_file: ../.env
|
||||
container_name: influx
|
||||
hostname: influx
|
||||
volumes:
|
||||
- influxdb:/var/lib/influxdb
|
||||
- influx:/var/lib/influxdb2
|
||||
- influx-etc:/etc/influxdb2
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
- monitoring
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
@@ -77,3 +68,21 @@ services:
|
||||
- "traefik.http.routers.influx.service=influx"
|
||||
- "traefik.http.services.influx.loadbalancer.server.port=8086"
|
||||
|
||||
watchtower:
|
||||
image: containrrr/watchtower
|
||||
container_name: watchtower
|
||||
hostname: watchtower
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- monitoring
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
WATCHTOWER_INCLUDE_STOPPED: true
|
||||
WATCHTOWER_MONITOR_ONLY: true
|
||||
WATCHTOWER_SCHEDULE: "0 20 8 * * *"
|
||||
WATCHTOWER_NOTIFICATIONS: "shoutrrr"
|
||||
WATCHTOWER_NOTIFICATION_URL: "mattermost://watchtower@cs-mm.ddnss.de/og4ckuqet7fafb8kjuaigzuh7c"
|
||||
WATCHTOWER_NOTIFICATION_TEMPLATE: "{{range .}}{{.Time.Format \"2006-01-02 15:04:05\"}} ({{.Level}}): {{.Message}}{{println}}{{end}}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user