From f432b2ea3551779bbbfdcd9e95f9bf2ee87792a3 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 8 Dec 2025 14:00:55 +0800 Subject: [PATCH 01/12] =?UTF-8?q?docs(harbor):=20=E6=9B=B4=E6=96=B0readme?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=AE=89=E8=A3=85=E8=B7=AF=E5=BE=84=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改安装文档中的路径说明,从相对路径改为绝对路径,避免用户混淆 --- harbor/readme.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/harbor/readme.md b/harbor/readme.md index dac4be3..932793c 100644 --- a/harbor/readme.md +++ b/harbor/readme.md @@ -24,12 +24,13 @@ 解压安装包: ``` +## cd /data/harbor tar xvf harbor-offline-installer-v2.14.1.tgz ``` 2. 进入harbor安装目录,修改配置文件 ``` -cd ./harbor +cd /data/harbor #复制 harbor的配置文件并改名harbor.yml cp -ar harbor.yml.tmpl harbor.yml #修改文件 @@ -48,10 +49,3 @@ vim harbor.yml docker compose -p harbor -f ./docker-compose.yml pull docker compose -p harbor -f ./docker-compose.yml up -d ``` - -``` -root@hkthyear-8015912443:/data/caddy/certificate/certificates/acme-v02.api.letsencrypt.org-directory/hub.6t7.net# lsd - hub.6t7.net.crt  hub.6t7.net.json 󰌆 hub.6t7.net.key -root@hkthyear-8015912443:/data/caddy/certificate/certificates/acme-v02.api.letsencrypt.org-directory/hub.6t7.net# -harbor#1977 -``` \ No newline at end of file From 9425288984c0ee6daf6550083d15b1e09be3b9d8 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 8 Dec 2025 15:14:03 +0800 Subject: [PATCH 02/12] =?UTF-8?q?build(docker):=20=E6=9B=B4=E6=96=B0=20Red?= =?UTF-8?q?is/Valkey=20=E9=95=9C=E5=83=8F=E7=89=88=E6=9C=AC=E8=87=B3?= =?UTF-8?q?=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 Redis 和 Valkey 的 Docker 镜像版本更新至最新稳定版,包括 6.2.21、7.4.7、8.4.0 和 9.0.0。同时将服务配置中的 Redis 替换为 Valkey 并保持容器名不变。 --- searxng/stack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searxng/stack.yml b/searxng/stack.yml index 32e2de6..43b930c 100644 --- a/searxng/stack.yml +++ b/searxng/stack.yml @@ -4,8 +4,8 @@ services: - redis: - image: ${Redis_TAG} + valkey: + image: ${Valkey_TAG} container_name: redis restart: unless-stopped command: valkey-server --save 30 1 --loglevel warning From 73d92f416517a5c5f99d043cb5d0e4017ced61c8 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 8 Dec 2025 15:14:53 +0800 Subject: [PATCH 03/12] =?UTF-8?q?fix:=20=E5=B0=86Valkey=E7=9A=84=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E9=97=B4=E9=9A=94=E4=BB=8E30=E7=A7=92=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BA60=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改了Valkey的持久化策略,减少磁盘IO操作频率以降低系统负载 --- searxng/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searxng/stack.yml b/searxng/stack.yml index 43b930c..e95a238 100644 --- a/searxng/stack.yml +++ b/searxng/stack.yml @@ -8,7 +8,7 @@ services: image: ${Valkey_TAG} container_name: redis restart: unless-stopped - command: valkey-server --save 30 1 --loglevel warning + command: valkey-server --save 60 1 --loglevel warning networks: - searxng volumes: From ad2286e43ad99b9801253a854114d2f98c98b4d2 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 8 Dec 2025 15:15:57 +0800 Subject: [PATCH 04/12] =?UTF-8?q?ci:=20=E5=B0=86=20Redis=20=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E6=9B=BF=E6=8D=A2=E4=B8=BA=20Valkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SearxNG 服务现在依赖于 Valkey 而不是 Redis,以提升性能和兼容性 --- searxng/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searxng/stack.yml b/searxng/stack.yml index e95a238..fefa519 100644 --- a/searxng/stack.yml +++ b/searxng/stack.yml @@ -19,7 +19,7 @@ services: container_name: searxng restart: unless-stopped depends_on: - - redis + - valkey environment: - SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/ - UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4} From f6437e5c4cf935801dde9e6dc9408367a8d5e203 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 8 Dec 2025 16:35:16 +0800 Subject: [PATCH 05/12] =?UTF-8?q?refactor(stack.yml):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?SEARXNG=5FBASE=5FURL=E5=B9=B6=E6=9B=B4=E6=96=B0=E5=8D=B7?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除不再需要的SEARXNG_BASE_URL环境变量,并将本地路径改为使用变量${Volumes_PATH}以增加配置灵活性 --- searxng/stack.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/searxng/stack.yml b/searxng/stack.yml index fefa519..deb16cf 100644 --- a/searxng/stack.yml +++ b/searxng/stack.yml @@ -21,7 +21,6 @@ services: depends_on: - valkey environment: - - SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/ - UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4} - UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4} ports: @@ -29,7 +28,7 @@ services: networks: - searxng volumes: - - ./searxng:/etc/searxng:rw + - ${Volumes_PATH}/etc-searxng:/etc/searxng:rw - ${Volumes_PATH}/searxng-data:/var/cache/searxng:rw networks: From 86f9dfa595443c18096f6aaa08b205eafa6572bb Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 10 Dec 2025 17:09:15 +0800 Subject: [PATCH 06/12] =?UTF-8?q?feat(db):=20=E6=B7=BB=E5=8A=A0Loki?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=85=8D=E7=BD=AE=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?n9e=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加Loki服务的环境配置和stack文件,同时为n9e服务新增20090端口映射 注释掉categraf服务配置以便后续调整 --- dbSer/loki/stack.yml | 7 ++++ n9e/compose-pgsql/docker-compose.yaml | 49 ++++++++++++++------------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/dbSer/loki/stack.yml b/dbSer/loki/stack.yml index e69de29..5e8ef95 100644 --- a/dbSer/loki/stack.yml +++ b/dbSer/loki/stack.yml @@ -0,0 +1,7 @@ + +services: + loki: + image: ${IMAGE_NAME}:${IMAGE_TAG} + ports: + - "3100:3100" + command: -config.file=/etc/loki/local-config.yaml \ No newline at end of file diff --git a/n9e/compose-pgsql/docker-compose.yaml b/n9e/compose-pgsql/docker-compose.yaml index bd228cd..9bd95d1 100644 --- a/n9e/compose-pgsql/docker-compose.yaml +++ b/n9e/compose-pgsql/docker-compose.yaml @@ -63,6 +63,7 @@ services: - ./n9eetc_pg:/app/etc ports: - "17000:17000" + - "20090:20090" networks: - nightingale depends_on: @@ -76,27 +77,27 @@ services: command: > sh -c "/app/n9e" - categraf: - image: "flashcatcloud/categraf:latest" - container_name: "categraf" - hostname: "categraf01" - restart: always - environment: - TZ: Asia/Shanghai - HOST_PROC: /hostfs/proc - HOST_SYS: /hostfs/sys - HOST_MOUNT_PREFIX: /hostfs - WAIT_HOSTS: nightingale:17000, nightingale:20090 - volumes: - - ./categraf/conf:/etc/categraf/conf - - /:/hostfs - - /var/run/docker.sock:/var/run/docker.sock - - ./prometc_vm:/etc/prometheus - # ports: - # - "9100:9100/tcp" - networks: - - nightingale - depends_on: - - nightingale - links: - - nightingale:nightingale \ No newline at end of file + # categraf: + # image: "flashcatcloud/categraf:latest" + # container_name: "categraf" + # hostname: "categraf01" + # restart: always + # environment: + # TZ: Asia/Shanghai + # HOST_PROC: /hostfs/proc + # HOST_SYS: /hostfs/sys + # HOST_MOUNT_PREFIX: /hostfs + # WAIT_HOSTS: nightingale:17000, nightingale:20090 + # volumes: + # - ./categraf/conf:/etc/categraf/conf + # - /:/hostfs + # - /var/run/docker.sock:/var/run/docker.sock + # - ./prometc_vm:/etc/prometheus + # # ports: + # # - "9100:9100/tcp" + # networks: + # - nightingale + # depends_on: + # - nightingale + # links: + # - nightingale:nightingale \ No newline at end of file From a3fe04158d795576ad4b44bd85f3795fe5aaba31 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 10 Dec 2025 17:14:22 +0800 Subject: [PATCH 07/12] =?UTF-8?q?chore(dbSer/loki):=20=E6=B7=BB=E5=8A=A0Lo?= =?UTF-8?q?ki=E6=9C=8D=E5=8A=A1=E7=9A=84volume=E6=8C=82=E8=BD=BD=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加本地配置文件挂载到Loki容器中,以支持自定义配置 --- dbSer/loki/stack.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbSer/loki/stack.yml b/dbSer/loki/stack.yml index 5e8ef95..85a5a25 100644 --- a/dbSer/loki/stack.yml +++ b/dbSer/loki/stack.yml @@ -1,7 +1,9 @@ - +## RUN: docker compose -p loki --env-file ./dbSer/loki/stack.ymlenv.cfg -f ./dbSer/loki/stack.yml up -d services: loki: image: ${IMAGE_NAME}:${IMAGE_TAG} ports: - "3100:3100" + volumes: + - /data/loki/local-config.yaml:/etc/loki/local-config.yaml command: -config.file=/etc/loki/local-config.yaml \ No newline at end of file From 3d6b5334784cd58b5db7e10f52a421aba6a5f80e Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 10 Dec 2025 17:18:26 +0800 Subject: [PATCH 08/12] =?UTF-8?q?fix(loki):=20=E4=BF=AE=E6=AD=A3=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E5=92=8C=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新Loki服务的配置文件路径和名称,从local-config.yaml改为loki-config.yaml,确保配置加载正确 --- dbSer/loki/stack.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbSer/loki/stack.yml b/dbSer/loki/stack.yml index 85a5a25..f860af0 100644 --- a/dbSer/loki/stack.yml +++ b/dbSer/loki/stack.yml @@ -1,9 +1,9 @@ -## RUN: docker compose -p loki --env-file ./dbSer/loki/stack.ymlenv.cfg -f ./dbSer/loki/stack.yml up -d +## RUN: docker compose -p loki --env-file ./dbSer/loki/env.cfg -f ./dbSer/loki/stack.yml up -d services: loki: image: ${IMAGE_NAME}:${IMAGE_TAG} ports: - "3100:3100" volumes: - - /data/loki/local-config.yaml:/etc/loki/local-config.yaml - command: -config.file=/etc/loki/local-config.yaml \ No newline at end of file + - /data/loki/loki-config.yaml:/etc/loki/loki-config.yaml + command: -config.file=/etc/loki/loki-config.yaml From 2b72127b2f8cfe889ab2b4e55d13ac1a4e639a5f Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 10 Dec 2025 17:36:36 +0800 Subject: [PATCH 09/12] =?UTF-8?q?ci(loki):=20=E6=B7=BB=E5=8A=A0=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E9=87=8D=E5=90=AF=E7=AD=96=E7=95=A5=E5=92=8C=E6=97=B6?= =?UTF-8?q?=E5=8C=BA=E8=AF=AD=E8=A8=80=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 always 重启策略确保服务异常时自动恢复 配置时区和语言环境以符合本地化需求 --- dbSer/loki/stack.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbSer/loki/stack.yml b/dbSer/loki/stack.yml index f860af0..1155c0b 100644 --- a/dbSer/loki/stack.yml +++ b/dbSer/loki/stack.yml @@ -4,6 +4,10 @@ services: image: ${IMAGE_NAME}:${IMAGE_TAG} ports: - "3100:3100" + restart: always + environment: + - TZ=Asia/Shanghai + - LANG=zh_CN.UTF-8 volumes: - /data/loki/loki-config.yaml:/etc/loki/loki-config.yaml command: -config.file=/etc/loki/loki-config.yaml From 87ea673fcca2a104a3cd7530d8b47e4bb861f4cc Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 11 Dec 2025 12:25:52 +0800 Subject: [PATCH 10/12] =?UTF-8?q?docs(loki):=20=E6=B7=BB=E5=8A=A0Loki?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=AF=B4=E6=98=8E=E5=92=8C=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加Loki的Docker安装文档链接和初始化配置命令 新增默认的loki-config.yaml配置文件 --- dbSer/loki/loki-config.yaml | 45 +++++++++++++++++++++++++++++++++++++ dbSer/loki/readme.md | 6 ++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 dbSer/loki/loki-config.yaml diff --git a/dbSer/loki/loki-config.yaml b/dbSer/loki/loki-config.yaml new file mode 100644 index 0000000..3e86116 --- /dev/null +++ b/dbSer/loki/loki-config.yaml @@ -0,0 +1,45 @@ +# Loki configuration file +# https://grafana.com/docs/loki/latest/configuration/ +# version: 3.6.2 +auth_enabled: false + +server: + http_listen_port: 3100 + +common: + instance_addr: 127.0.0.1 + path_prefix: /loki + storage: + filesystem: + chunks_directory: /loki/chunks + rules_directory: /loki/rules + replication_factor: 1 + ring: + kvstore: + store: inmemory + +schema_config: + configs: + - from: 2020-10-24 + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: index_ + period: 24h + +ruler: + alertmanager_url: http://localhost:9093 + +# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration +# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ +# +# Statistics help us better understand how Loki is used, and they show us performance +# levels for most users. This helps us prioritize features and documentation. +# For more information on what's sent, look at +# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go +# Refer to the buildReport method to see what goes into a report. +# +# If you would like to disable reporting, uncomment the following lines: +#analytics: +# reporting_enabled: false \ No newline at end of file diff --git a/dbSer/loki/readme.md b/dbSer/loki/readme.md index d4d65fc..eebd72e 100644 --- a/dbSer/loki/readme.md +++ b/dbSer/loki/readme.md @@ -2,4 +2,8 @@ [loki docker 安装文档](https://grafana.com/docs/loki/latest/setup/install/docker/) - +``` +mkdir -p loki +cd loki +wget https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-config.yaml -O loki-config.yaml +``` From bf18c8f69aa57246543c3781270a0a2b23f04512 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 11 Dec 2025 13:50:35 +0800 Subject: [PATCH 11/12] =?UTF-8?q?docs(loki):=20=E6=9B=B4=E6=96=B0readme?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=89=E8=A3=85=E5=92=8C=E5=A4=9A=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E9=85=8D=E7=BD=AE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加loki服务的安装步骤和多租户认证配置示例,方便后续部署参考 --- dbSer/loki/readme.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dbSer/loki/readme.md b/dbSer/loki/readme.md index eebd72e..1f0599a 100644 --- a/dbSer/loki/readme.md +++ b/dbSer/loki/readme.md @@ -2,8 +2,26 @@ [loki docker 安装文档](https://grafana.com/docs/loki/latest/setup/install/docker/) +### 安装 loki 服务 ``` mkdir -p loki cd loki wget https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-config.yaml -O loki-config.yaml ``` + +### 配置多租户认证配置 + +[参考文档](https://grafana.com/docs/loki/latest/configuration/#auth_enabled) + +```yaml +auth_enabled: true + +limits_config: + allow_private_metrics: true + enforce_metric_name: false + reject_old_samples: true + reject_old_samples_max_age: 168h + +multitenancy_enabled: true +``` + From 5ffe49596a7e39fab9db429d38079b3c69b6746a Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 11 Dec 2025 15:32:48 +0800 Subject: [PATCH 12/12] =?UTF-8?q?fix(loki):=20=E4=BF=AE=E6=AD=A3=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E5=90=8D=E7=A7=B0=E9=85=8D=E7=BD=AE=E4=BB=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新env.cfg和stack.yml文件,确保镜像名称正确使用IMAGE_TAG环境变量 --- dbSer/loki/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbSer/loki/stack.yml b/dbSer/loki/stack.yml index 1155c0b..8ba439d 100644 --- a/dbSer/loki/stack.yml +++ b/dbSer/loki/stack.yml @@ -1,7 +1,7 @@ ## RUN: docker compose -p loki --env-file ./dbSer/loki/env.cfg -f ./dbSer/loki/stack.yml up -d services: loki: - image: ${IMAGE_NAME}:${IMAGE_TAG} + image: ${IMAGE_NAME} ports: - "3100:3100" restart: always