Forráskód Böngészése

maintenance updates

larry1chan@qq.com 8 hónapja
szülő
commit
344c79eaad

+ 1 - 1
nextcloud/.env

@@ -7,5 +7,5 @@ USERROOT_MICHELLE=/media/yazoo/nextcloud_files/apex/michellechanpl
 USERROOT_JENNIFER=/media/yazoo/nextcloud_files/apex/jennifer.pui
 USERROOT_MINDY=/media/yazoo/nextcloud_files/apex/mindy.lui
 USERROOT_PLAYER1=/media/yazoo/nextcloud_files/apex/player1
-#USERROOT_EXT1=/media/yazoo/wdcrypt/2025-docker-data-migration
+USERROOT_CRM_MEDIA_PROGRAMS=/media/yazoo/luks-67672a15-a412-4a17-bb01-c76509e21243/crm/crm-media/programs
 USERROOT_EXT2=/media/yazoo/nextcloud_files

+ 8 - 8
nextcloud/docker-compose.yml

@@ -1,6 +1,13 @@
 version: '3'
 
 volumes:
+  files_ext_crm-media-programs:
+    name: ${CONTAINER_NAME}_files_crm-media-programs
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_CRM_MEDIA_PROGRAMS}
 
 
   files_ext2:
@@ -11,13 +18,6 @@ volumes:
       o: 'bind'
       device: ${USERROOT_EXT2} 
 
-  files_ext1:
-    name: ${CONTAINER_NAME}_files_ext1
-    driver: local
-    driver_opts:
-      type: volume
-      o: 'bind'
-      device: ${USERROOT_EXT1} 
 
   files_larry:
     name: ${CONTAINER_NAME}_files_larry
@@ -123,8 +123,8 @@ services:
       - files_jennifer:/var/www/html/data/jennifer
       - files_michelle:/var/www/html/data/michelle
       - files_larry:/var/www/html/data/larry
-      - files_ext1:/mnt/ext1
       - files_ext2:/mnt/ext2
+      - files_ext_crm-media-programs:/mnt/ext_crm-media-programs
     restart: "no" 
     environment:
       - REDIS_HOST=redis

+ 210 - 0
nextcloud/docker-compose.yml-rm-ext1

@@ -0,0 +1,210 @@
+version: '3'
+
+volumes:
+
+
+  files_ext2:
+    name: ${CONTAINER_NAME}_files_ext2
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_EXT2} 
+
+  files_ext1:
+    name: ${CONTAINER_NAME}_files_ext1
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_EXT1} 
+
+  files_larry:
+    name: ${CONTAINER_NAME}_files_larry
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_LARRY} 
+
+  files_michelle:
+    name: ${CONTAINER_NAME}_files_michelle
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_MICHELLE} 
+
+  files_jennifer:
+    name: ${CONTAINER_NAME}_files_jennifer
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_JENNIFER} 
+
+  files_mindy:
+    name: ${CONTAINER_NAME}_files_mindy
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_MINDY} 
+
+  files_player1:
+    name: ${CONTAINER_NAME}_files_player1
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_PLAYER1} 
+
+  files:
+    name: ${CONTAINER_NAME}_files
+    driver: local
+
+  db:
+    name: ${CONTAINER_NAME}_db
+    driver: local
+
+  redis:
+    name: ${CONTAINER_NAME}_redis
+    driver: local
+
+  es_index:
+    name: ${CONTAINER_NAME}_es_index
+    driver: local
+
+  oo_data:
+    name: ${CONTAINER_NAME}_oo_data
+    driver: local
+ 
+  clamav:
+    name: ${CONTAINER_NAME}_clamav
+    driver: local
+
+services:
+  db:
+    image: mariadb:11.4.2
+    container_name: ${CONTAINER_NAME}_db
+    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
+    restart: "no" 
+    volumes:
+      - db:/var/lib/mysql
+    #  - db_r1:/var/lib/mysql
+    environment:
+      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
+      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
+      - MYSQL_DATABASE=nextcloud
+      - MYSQL_USER=nextcloud
+
+
+  redis:
+    image: redis:7.2.4-alpine
+    container_name: ${CONTAINER_NAME}_redis
+    restart: "no"
+    volumes:
+      - redis:/var/lib/redis
+
+
+  app:
+#    image: nextcloud:30.0.4-apache
+    image: nextcloud-ffmpeg-image:latest
+    container_name: ${CONTAINER_NAME}
+    ports:
+      - 1234:80
+    links:
+      - db
+      - redis
+    volumes:
+      - files:/var/www/html
+      - files_player1:/var/www/html/data/player1
+      - files_mindy:/var/www/html/data/mindy
+      - files_jennifer:/var/www/html/data/jennifer
+      - files_michelle:/var/www/html/data/michelle
+      - files_larry:/var/www/html/data/larry
+      - files_ext1:/mnt/ext1
+      - files_ext2:/mnt/ext2
+    restart: "no" 
+    environment:
+      - REDIS_HOST=redis
+      - REDIS_PASSWORD=
+      - PHP_MEMORY_LIMIT=1G
+      - PHP_UPLOAD_LIMIT=12G
+    devices:
+      - /dev/dri:/dev/dri # VA-API (omit for NVENC)
+
+
+  cron:
+    image: nextcloud:30.0.4-apache
+    container_name: ${CONTAINER_NAME}_cron
+    links:
+      - db
+      - redis
+    volumes:
+      - files:/var/www/html
+    restart: "no" 
+    entrypoint: /cron.sh
+
+
+  es01:
+#    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.23
+    image: elasticsearch-ingest:latest 
+    container_name: ${CONTAINER_NAME}_es 
+    environment:
+      - node.name=es01
+      - discovery.type=single-node
+    ulimits:
+      memlock:
+        soft: -1
+        hard: -1
+    volumes:
+      - es_index:/usr/share/elasticsearch/data
+    restart: "no" 
+    ports:
+      - 9200:9200
+
+
+  av:
+    container_name: ${CONTAINER_NAME}_clamav 
+    image: mkodockx/docker-clamav:alpine
+    restart: "no" 
+    ports:
+      - 3310:3310
+    volumes:
+      - clamav:/etc/clamav
+
+
+  onlyoffice:
+    container_name: ${CONTAINER_NAME}_onlyoffice
+    image: onlyoffice/documentserver:latest
+    restart: "no"
+    environment:
+      - JWT_SECRET=secret
+    ports:
+      - 9980:80
+    volumes:
+      - oo_data:/var/www/onlyoffice/Data
+      - oo_data:/var/log/onlyoffice
+
+
+  go-vod:
+    container_name: ${CONTAINER_NAME}_govod
+    image: radialapps/go-vod
+    restart: "no" 
+    init: true
+    depends_on:
+      - app 
+    environment:
+      - NEXTCLOUD_HOST=${NEXTCLOUD_HOST}
+      # - NEXTCLOUD_ALLOW_INSECURE=1 # (self-signed certs or no HTTPS)
+      - NVIDIA_VISIBLE_DEVICES=all
+    devices:
+      - /dev/dri:/dev/dri # VA-API (omit for NVENC)
+    volumes:
+      - files:/var/www/html:ro
+
+
+networks:
+  default:
+      

+ 52 - 0
nextcloud_duplicati/shutdown_nextcloud.sh

@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# Script to shut down a list of Docker containers in non-interactive mode
+
+# Array of container IDs or names (modify this array as needed)
+CONTAINERS=(
+    "nc6"
+    "nc6_govod"
+    "nc6_cron"
+    "nc6_db"
+    "nc6_es"
+    "nc6_clamav"
+    "nc6_onlyoffice"
+    "nc6_redis"
+)
+
+# Function to check if a command was successful
+check_status() {
+    if [ $? -ne 0 ]; then
+        echo "Error: $1 failed. Exiting."
+        exit 1
+    fi
+}
+
+# Step 1: Process each container in the array
+if [ ${#CONTAINERS[@]} -gt 0 ]; then
+    echo "Processing specified containers..."
+    for CONTAINER in "${CONTAINERS[@]}"; do
+        # Check if the container exists
+        echo "Checking if container '$CONTAINER' exists..."
+        docker ps -a --filter "name=$CONTAINER" --format '{{.Names}}' | grep -q "^$CONTAINER$"
+        if [ $? -ne 0 ]; then
+            echo "Warning: Container '$CONTAINER' does not exist. Skipping."
+            continue
+        fi
+
+        # Stop the container
+        echo "Stopping container '$CONTAINER'..."
+        docker stop "$CONTAINER"
+        check_status "Stopping container '$CONTAINER'"
+
+        # Remove the container
+        #echo "Removing container '$CONTAINER'..."
+        #docker rm "$CONTAINER"
+        #check_status "Removing container '$CONTAINER'"
+    done
+else
+    echo "Error: No containers specified in the array. Exiting."
+    exit 1
+fi
+
+echo "All specified containers have been successfully shut down and removed."

+ 7 - 7
prometheus/download_exporter/config.yml

@@ -6,18 +6,18 @@ tr:
 
 tr2:
     client: transmission
-    host: http://192.168.1.124:9187
+    host: http://192.168.1.119:9187
     username:
     password:
 
 tr3:
     client: transmission
-    host: http://192.168.1.124:9084
+    host: http://192.168.1.119:9084
     username:
     password:
 
-1900acs:
-    client: transmission
-    host: http://192.168.6.1:9091
-    username:
-    password:
+#1900acs:
+#    client: transmission
+#    host: http://192.168.6.1:9091
+#    username:
+#    password:

+ 2 - 2
scripts/dockers_init.sh

@@ -7,8 +7,8 @@ CONTAINER_ROOT="/home/yazoo/projects/gog/Dockers_real"
 #
 #### 2025-02-19 
 #CONTAINERS_UP=(jupyter gogs sslwp ftp nu_nc squid minidlna calibre ampache prometheus guacamole mediawiki torproxy6 samba jellyfin openvpn wireguard stackedit docker-registry baidu syncthing transmission transmission-sbt transmission-gm)
-CONTAINERS_UP=(duplicati nextcloud calibre-cronx gogs sslwp ftp ampache prometheus mediawiki jellyfin wireguard docker-registry wol-app transmission transmission-sbt transmission-gm)
-CONTAINERS_DOWN=(duplicati transmission transmission-sbt calibre calibre-web transmission-gm jellyfin nc6_govod nc6_cron nc6 nc6_onlyoffice nc6_redis nc6_es nc6_clamav nc6_db wol-app ftpd ampache calibre-cronx monitoring_grafana prometheus cadvisor redis node-exporter gogs mwiki mwiki_mysql mwiki_parsoid mwiki_es  downloader-exporter-bt wireguard  docker-registry docker-registry-ui ) 
+CONTAINERS_UP=(duplicati nextcloud nextcloud_duplicati calibre calibre-cronx gogs sslwp ftp ampache prometheus mediawiki jellyfin wireguard docker-registry wol-app transmission transmission-sbt transmission-gm)
+CONTAINERS_DOWN=(duplicati nextcloud_duplicati transmission transmission-sbt calibre calibre-web transmission-gm jellyfin nc6_govod nc6_cron nc6 nc6_onlyoffice nc6_redis nc6_es nc6_clamav nc6_db wol-app ftpd ampache calibre-cronx monitoring_grafana prometheus cadvisor redis node-exporter gogs mwiki mwiki_mysql mwiki_parsoid mwiki_es  downloader-exporter-bt wireguard  docker-registry docker-registry-ui ) 
 
 
 if [[ $1 == "up" ]]

BIN
scripts/encrypted_passphrase.dat


+ 1 - 0
scripts/luks

@@ -0,0 +1 @@
+Subproject commit ac225a3bb2232aa6adc03d64728bb7e1da26ff4c

+ 51 - 0
scripts/unlock_crucial.sh

@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# crucial mx500 2TB
+# disk s/n: CT2000MX500SSD1 
+#
+LV_NAME1=xxx
+LUKS_MNT1=luks-${LV_NAME1}
+#
+#
+#
+UNLOCK_MNT1=/media/yazoo/${LUKS_MNT1}
+#
+# Check if mount point exists, create if not
+if [ ! -d "$UNLOCK_MNT1" ]; then
+    echo "Mount point $UNLOCK_MNT1 does not exist. Creating it..."
+    sudo mkdir -p "$UNLOCK_MNT1"
+    if [ $? -eq 0 ]; then
+        echo "Mount point $UNLOCK_MNT1 created successfully."
+    else
+        echo "Failed to create mount point $UNLOCK_MNT1. Exiting."
+        exit 1
+    fi
+fi
+
+# Unmount and close LUKS device if already mounted/opened
+sudo umount "$UNLOCK_MNT1" 2>/dev/null
+sudo cryptsetup luksClose "$LUKS_MNT1" 2>/dev/null
+
+# Open LUKS device
+echo "Unlocking QNAP disk TOSHIBA 4x2T ..."
+sudo cryptsetup luksOpen UUID=$LV_NAME1 "$LUKS_MNT1"
+if [ $? -eq 0 ]; then
+    echo "LUKS device unlocked successfully."
+else
+    echo "Failed to unlock LUKS device. Exiting."
+    exit 1
+fi
+
+# Mount the unlocked device
+echo "Mounting ..."
+sudo mount /dev/mapper/"$LUKS_MNT1" "$UNLOCK_MNT1"
+if [ $? -eq 0 ]; then
+    echo "Device mounted successfully at $UNLOCK_MNT1."
+else
+    echo "Failed to mount device. Closing LUKS device."
+    sudo cryptsetup luksClose "$LUKS_MNT1"
+    exit 1
+fi
+
+# Optional: Remount with specific options (if needed)
+# sudo mount -o rw,remount /dev/mapper/"$LUKS_MNT1" "$UNLOCK_MNT1"