From 19aa0b6a550e4b35da60371013d7b72598c28e2d Mon Sep 17 00:00:00 2001 From: BhasherBEL Date: Tue, 23 May 2023 17:01:04 +0200 Subject: [PATCH] Remove invoiceninja, optimize monitoring --- bxl-rpi/apps/docker-compose.invoice.yaml | 92 +++++++++---------- bxl-rpi/config/monitoring/prometheus.yaml | 2 +- bxl-rpi/system/docker-compose.backup.yaml | 10 +- bxl-rpi/system/docker-compose.monitoring.yaml | 5 +- 4 files changed, 52 insertions(+), 57 deletions(-) diff --git a/bxl-rpi/apps/docker-compose.invoice.yaml b/bxl-rpi/apps/docker-compose.invoice.yaml index d4b5a52..8b4a0af 100644 --- a/bxl-rpi/apps/docker-compose.invoice.yaml +++ b/bxl-rpi/apps/docker-compose.invoice.yaml @@ -1,50 +1,50 @@ services: - invoicenginx: - container_name: invoice_nginx - image: nginx:latest - restart: on-failure - volumes: - - $CONFIG/invoiceninja/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro - - $DATA/invoiceninja/public:/var/www/app/public:ro - environment: - - TRUSTED_PROXIES='*' - depends_on: - - invoiceninja - networks: - - invoice - - external - #labels: - #- "traefik.enable=true" - #- "traefik.http.routers.invoice.rule=Host(`invoice.bhasher.com`)" - #- "traefik.http.services.invoice.loadbalancer.server.port=80" - #- "traefik.http.routers.invoice.tls=true" - #- "traefik.http.routers.invoice.tls.certresolver=http" - #- "traefik.http.routers.invoice.entrypoints=internalsecure" - - invoiceninja: - image: invoiceninja/invoiceninja:5 - container_name: invoice_ninja - environment: - - APP_URL=https://invoice.bhasher.com - - APP_KEY=${INVOICENINJA_APIKEY} - - REQUIRE_HTTPS=true - - PHANTOMJS_PDF_GENERATION=false - - PDF_GENERATOR=snappdf - - QUEUE_CONNECTION=database - - DB_HOST=mariadb - - DB_DATABASE=invoiceninja - - DB_USERNAME=root - - DB_PASSWORD=${MARIADB_ROOT} - - IN_USER_EMAIL=invoice@bhasher.com - - IN_PASSWORD=${INVOICENINJA_PASSWORD} - - TRUSTED_PROXIES='*' - restart: unless-stopped - volumes: - - $DATA/invoiceninja/public:/var/www/app/public:rw - - $DATA/invoiceninja/storage:/var/www/app/storage:rw - networks: - - invoice - - storage +# invoicenginx: +# container_name: invoice_nginx +# image: nginx:latest +# restart: on-failure +# volumes: +# - $CONFIG/invoiceninja/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro +# - $DATA/invoiceninja/public:/var/www/app/public:ro +# environment: +# - TRUSTED_PROXIES='*' +# depends_on: +# - invoiceninja +# networks: +# - invoice +# - external +# #labels: +# #- "traefik.enable=true" +# #- "traefik.http.routers.invoice.rule=Host(`invoice.bhasher.com`)" +# #- "traefik.http.services.invoice.loadbalancer.server.port=80" +# #- "traefik.http.routers.invoice.tls=true" +# #- "traefik.http.routers.invoice.tls.certresolver=http" +# #- "traefik.http.routers.invoice.entrypoints=internalsecure" +# +# invoiceninja: +# image: invoiceninja/invoiceninja:5 +# container_name: invoice_ninja +# environment: +# - APP_URL=https://invoice.bhasher.com +# - APP_KEY=${INVOICENINJA_APIKEY} +# - REQUIRE_HTTPS=true +# - PHANTOMJS_PDF_GENERATION=false +# - PDF_GENERATOR=snappdf +# - QUEUE_CONNECTION=database +# - DB_HOST=mariadb +# - DB_DATABASE=invoiceninja +# - DB_USERNAME=root +# - DB_PASSWORD=${MARIADB_ROOT} +# - IN_USER_EMAIL=invoice@bhasher.com +# - IN_PASSWORD=${INVOICENINJA_PASSWORD} +# - TRUSTED_PROXIES='*' +# restart: unless-stopped +# volumes: +# - $DATA/invoiceninja/public:/var/www/app/public:rw +# - $DATA/invoiceninja/storage:/var/www/app/storage:rw +# networks: +# - invoice +# - storage invoiceplane: container_name: invoiceplane diff --git a/bxl-rpi/config/monitoring/prometheus.yaml b/bxl-rpi/config/monitoring/prometheus.yaml index 0150e83..9e14f82 100644 --- a/bxl-rpi/config/monitoring/prometheus.yaml +++ b/bxl-rpi/config/monitoring/prometheus.yaml @@ -1,5 +1,5 @@ global: - scrape_interval: 30s # By default, scrape targets every 15 seconds. + scrape_interval: 60s # By default, scrape targets every 15 seconds. # Attach these labels to any time series or alerts when communicating with # external systems (federation, remote storage, Alertmanager). diff --git a/bxl-rpi/system/docker-compose.backup.yaml b/bxl-rpi/system/docker-compose.backup.yaml index f642723..693c3ff 100644 --- a/bxl-rpi/system/docker-compose.backup.yaml +++ b/bxl-rpi/system/docker-compose.backup.yaml @@ -14,12 +14,6 @@ services: - COMPRESSION=lz4 - PRUNE=1 restart: "no" + profiles: + - dnr - cron: - container_name: cron-scheduling - image: alpine:latest - volumes: - - ./config/cron:/etc/cron.d:ro - - /etc/localtime:/etc/localtime:ro - command: crond -f - restart: unless-stopped diff --git a/bxl-rpi/system/docker-compose.monitoring.yaml b/bxl-rpi/system/docker-compose.monitoring.yaml index bf2ae93..424aa3a 100644 --- a/bxl-rpi/system/docker-compose.monitoring.yaml +++ b/bxl-rpi/system/docker-compose.monitoring.yaml @@ -75,8 +75,9 @@ services: - /var/lib/docker/:/var/lib/docker:ro restart: always command: - - "--housekeeping_interval=30s" + - "--housekeeping_interval=60s" - "--docker_only=true" + - "--store_container_labels=false" - "--disable_metrics=percpu,sched,tcp,udp,disk,diskIO,hugetlb,referenced_memory,cpu_topology,resctrl" networks: - monitoring @@ -99,7 +100,7 @@ services: - '--path.rootfs=/host' - '--path.procfs=/host/proc' - '--path.sysfs=/host/sys' - - --collector.filesystem.ignored-mount-points + - '--collector.filesystem.ignored-mount-points' - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" restart: always networks: