From ed988ea7dd433d842ff7056da490a455e0e7558a Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 27 Aug 2025 12:12:51 +0800 Subject: [PATCH 01/10] =?UTF-8?q?build:=20=E6=9B=B4=E6=96=B0=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E9=95=9C=E5=83=8F=E7=89=88=E6=9C=AC=E8=87=B3=E6=9C=80?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 portainer-ce、redis、victoriametrics 和 nightingale 的容器镜像版本更新至最新稳定版 --- n9e/compose-mysql/compose.yml | 8 +++++--- portainer-ce/env.cfg | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/n9e/compose-mysql/compose.yml b/n9e/compose-mysql/compose.yml index e3cbcea..d6fe030 100644 --- a/n9e/compose-mysql/compose.yml +++ b/n9e/compose-mysql/compose.yml @@ -21,7 +21,7 @@ services: - "3306:3306" redis: - image: "redis:7.4-alpine" + image: "redis:8-alpine" container_name: redis hostname: redis restart: always @@ -54,7 +54,7 @@ services: # - "9090:9090" victoriametrics: - image: victoriametrics/victoria-metrics:v1.108.1 + image: victoriametrics/victoria-metrics:v1.124.0 container_name: victoriametrics hostname: victoriametrics restart: always @@ -68,7 +68,7 @@ services: - "--loggerTimezone=Asia/Shanghai" nightingale: - image: "flashcatcloud/nightingale:8.0.0-beta.3" + image: "flashcatcloud/nightingale:8.2.2" container_name: nightingale hostname: nightingale restart: always @@ -90,6 +90,8 @@ services: command: > sh -c "/app/n9e" +# categraf 采集器 +# 用于测试, 安装时可以 注释掉 categraf: image: "flashcatcloud/categraf:v0.4.1" container_name: "categraf" diff --git a/portainer-ce/env.cfg b/portainer-ce/env.cfg index 43b3ec8..7ffc26c 100644 --- a/portainer-ce/env.cfg +++ b/portainer-ce/env.cfg @@ -1,4 +1,4 @@ # IMAGE_LATEST=portainer/portainer-ce:2.19.4 #IMAGE_LATEST=portainer/portainer-ce:latest -IMAGE_TAG=portainer/portainer-ce:2.32.0 -AGENT_TAG=portainer/agent:2.32.0 +IMAGE_TAG=portainer/portainer-ce:2.33.0 +AGENT_TAG=portainer/agent:2.33.0 From 9034fa472bb093659c5667ef2208ba3d37a65e61 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 27 Aug 2025 12:22:09 +0800 Subject: [PATCH 02/10] =?UTF-8?q?build(drawnix):=20=E6=B7=BB=E5=8A=A0docke?= =?UTF-8?q?r=20compose=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加stack.yml和env.cfg配置文件用于部署drawnix服务 --- drawnix/env.cfg | 1 + drawnix/stack.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 drawnix/env.cfg create mode 100644 drawnix/stack.yml diff --git a/drawnix/env.cfg b/drawnix/env.cfg new file mode 100644 index 0000000..2c75835 --- /dev/null +++ b/drawnix/env.cfg @@ -0,0 +1 @@ +IMAGE_TAG=pubuzhixing/drawnix:v0.2.0 \ No newline at end of file diff --git a/drawnix/stack.yml b/drawnix/stack.yml new file mode 100644 index 0000000..96d7e22 --- /dev/null +++ b/drawnix/stack.yml @@ -0,0 +1,12 @@ +# pull:: docker compose -p drawnix --env-file ./drawnix/env.cfg -f ./drawnix/stack.yml pull +# run:: docker compose -p drawnix --env-file ./drawnix/env.cfg -f ./drawnix/stack.yml up -d + +services: + drawnix: + image: ${IMAGE_TAG} + container_name: drawnix + environment: + - TZ=Asia/Shanghai + ports: + - 5080:80 + restart: unless-stopped From e51f84f6e14021c6e9e7d933dee92c2da52813d8 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 28 Aug 2025 17:34:26 +0800 Subject: [PATCH 03/10] =?UTF-8?q?feat(traefik):=20=E6=B7=BB=E5=8A=A0traefi?= =?UTF-8?q?k=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=92=8Cdocker-compose?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加traefik相关配置文件包括环境变量、主配置、动态配置和docker-compose部署文件 更新tasks.md中的docker compose命令语法 --- tasks.md/stack.yml | 4 +-- traefik/data/configurations/dynamic.yml | 33 +++++++++++++++++ traefik/data/traefik.yml | 47 +++++++++++++++++++++++++ traefik/env.cfg | 3 ++ traefik/stack.yml | 38 ++++++++++++++++++++ 5 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 traefik/data/configurations/dynamic.yml create mode 100644 traefik/data/traefik.yml create mode 100644 traefik/env.cfg create mode 100644 traefik/stack.yml diff --git a/tasks.md/stack.yml b/tasks.md/stack.yml index 38e0c73..1c5feba 100644 --- a/tasks.md/stack.yml +++ b/tasks.md/stack.yml @@ -1,6 +1,6 @@ # path:: mkdir -pv /data/volumes/tasks.md/{tasks,config} -# pull:: docker tasks.md -p memos --env-file ./tasks.md/env.cfg -f ./tasks.md/stack.yml pull -# run:: docker tasks.md -p memos --env-file ./tasks.md/env.cfg -f ./tasks.md/stack.yml up -d +# pull:: docker compose -p tasks.md --env-file ./tasks.md/env.cfg -f ./tasks.md/stack.yml pull +# run:: docker compose -p tasks.md --env-file ./tasks.md/env.cfg -f ./tasks.md/stack.yml up -d services: tasks.md: diff --git a/traefik/data/configurations/dynamic.yml b/traefik/data/configurations/dynamic.yml new file mode 100644 index 0000000..b9cd41e --- /dev/null +++ b/traefik/data/configurations/dynamic.yml @@ -0,0 +1,33 @@ +# Dynamic configuration +http: + middlewares: + nofloc: + headers: + customResponseHeaders: + Permissions-Policy: "interest-cohort=()" + secureHeaders: + headers: + sslRedirect: true + forceSTSHeader: true + stsIncludeSubdomains: true + stsPreload: true + stsSeconds: 31536000 + + # UserName : admin + # Password : qwer1234 + user-auth: + basicAuth: + users: + - "admin:$apr1$tm53ra6x$FntXd6jcvxYM/YH0P2hcc1" + +tls: + options: + default: + cipherSuites: + - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 + - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 + minVersion: VersionTLS12 \ No newline at end of file diff --git a/traefik/data/traefik.yml b/traefik/data/traefik.yml new file mode 100644 index 0000000..7ff6d7f --- /dev/null +++ b/traefik/data/traefik.yml @@ -0,0 +1,47 @@ +api: + dashboard: true + +entryPoints: + web: + address: :80 + http: + redirections: + entryPoint: + to: websecure + + websecure: + address: :443 + http: + middlewares: + - secureHeaders@file + - nofloc@file + tls: + certResolver: letsencrypt + +pilot: + dashboard: false + +providers: + docker: + endpoint: "unix:///var/run/docker.sock" + exposedByDefault: false + file: + filename: /configurations/dynamic.yml + +certificatesResolvers: + letsencrypt: + acme: + email: admin@yourdomain + storage: acme.json + keyType: EC384 + httpChallenge: + entryPoint: web + + buypass: + acme: + email: admin@yourdomain + storage: acme.json + caServer: https://api.buypass.com/acme/directory + keyType: EC256 + httpChallenge: + entryPoint: web \ No newline at end of file diff --git a/traefik/env.cfg b/traefik/env.cfg new file mode 100644 index 0000000..859e568 --- /dev/null +++ b/traefik/env.cfg @@ -0,0 +1,3 @@ +IMAGE_TAG_V3=traefik:v3.5.1 +IMAGE_TAG_V2=traefik:v2.11.29 +IMAGE_TAG_LATEST=traefik:latest \ No newline at end of file diff --git a/traefik/stack.yml b/traefik/stack.yml new file mode 100644 index 0000000..576f6b1 --- /dev/null +++ b/traefik/stack.yml @@ -0,0 +1,38 @@ +# +# Traefik +# RUN: docker compose -p traefik --env-file ./traefik/env.cfg -f ./traefik/stack.yml up -d +# PULL: docker compose -p traefik --env-file ./traefik/env.cfg -f ./traefik/stack.yml pull + +services: + traefik: + image: ${IMAGE_TAG_LATEST} + container_name: traefik + restart: always + ports: + - "80:80" + - "443:443" + volumes: + - /etc/localtime:/etc/localtime:ro + - /var/run/docker.sock:/var/run/docker.sock:ro + - ./data/traefik.yml:/traefik.yml:ro + - ./data/acme.json:/acme.json + # Add folder with dynamic configuration yml + - ./data/configurations:/configurations + networks: + - traefik-proxy + labels: + - "traefik.enable=true" + - "traefik.http.routers.traefik.entrypoints=web" + - "traefik.http.routers.traefik.rule=Host(`traefik.6t7.com`)" + - "traefik.http.routers.traefik.tls=true" + - "traefik.http.routers.traefik.tls.certresolver=le" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" + +networks: + + traefik-proxy: + external: true \ No newline at end of file From 9f2bdc951ef051d94a50ba326983870636c8662c Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 28 Aug 2025 17:35:11 +0800 Subject: [PATCH 04/10] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20Portainer?= =?UTF-8?q?=20CE=20=E5=92=8C=20Agent=20=E9=95=9C=E5=83=8F=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=87=B3=202.33.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- portainer-ce/env.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portainer-ce/env.cfg b/portainer-ce/env.cfg index 7ffc26c..105680d 100644 --- a/portainer-ce/env.cfg +++ b/portainer-ce/env.cfg @@ -1,4 +1,4 @@ # IMAGE_LATEST=portainer/portainer-ce:2.19.4 #IMAGE_LATEST=portainer/portainer-ce:latest -IMAGE_TAG=portainer/portainer-ce:2.33.0 -AGENT_TAG=portainer/agent:2.33.0 +IMAGE_TAG=portainer/portainer-ce:2.33.1 +AGENT_TAG=portainer/agent:2.33.1 From 1c31282856265ced0a547a21af06fbd9c3ef1482 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 28 Aug 2025 20:27:42 +0800 Subject: [PATCH 05/10] =?UTF-8?q?ci(redis):=20=E6=9B=B4=E6=96=B0Redis?= =?UTF-8?q?=E5=92=8CValkey=E7=9A=84docker=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加restart策略和环境变量配置 设置内存限制和淘汰策略 修正docker compose文件路径注释 --- dbSer/redis/redis.stack.yml | 11 +++++++++-- dbSer/redis/valkey.stack.yml | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dbSer/redis/redis.stack.yml b/dbSer/redis/redis.stack.yml index 4442cda..4020d50 100644 --- a/dbSer/redis/redis.stack.yml +++ b/dbSer/redis/redis.stack.yml @@ -1,11 +1,18 @@ -# Pull: docker compose -p redis --env-file ./base/redis/env.cfg -f ./base/redis/redis.stack.yml pull +# Pull: docker compose -p redis --env-file ./dbSer/redis/env.cfg -f ./dbSer/redis/redis.stack.yml pull -# Run:: docker compose -p redis --env-file ./base/redis/env.cfg -f ./base/redis/redis.stack.yml up -d +# Run:: docker compose -p redis --env-file ./dbSer/redis/env.cfg -f ./dbSer/redis/redis.stack.yml up -d services: redis: image: ${IMAGE_TAG_REDISV8} + restart: always ports: - '6379:6379' command: redis-server --appendonly yes volumes: - '${Volumes_PATH}/redis:/data' + environment: + - REDIS_PASSWORD=${REDIS_PASSWORD} + - REDIS_PORT=6379 + - REDIS_DB=1 + - REDIS_MAXMEMORY=1gb + - REDIS_MAXMEMORYPOLICY=allkeys-lru diff --git a/dbSer/redis/valkey.stack.yml b/dbSer/redis/valkey.stack.yml index f06dc53..6de1f25 100644 --- a/dbSer/redis/valkey.stack.yml +++ b/dbSer/redis/valkey.stack.yml @@ -4,6 +4,7 @@ services: redis: image: ${IMAGE_TAG_VALKEYV8} + restart: always ports: - '6379:6379' command: valkey-server --appendonly yes --requirepass ${REDIS_PASSWORD} From 88fcb5d93ba1131298e3439e5ec63298be559145 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 28 Aug 2025 20:34:45 +0800 Subject: [PATCH 06/10] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=A0=87=E7=AD=BE=E4=BB=8E2.7=E5=88=B03.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hub-registry/env.cnf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub-registry/env.cnf b/hub-registry/env.cnf index f6126a4..61310aa 100644 --- a/hub-registry/env.cnf +++ b/hub-registry/env.cnf @@ -1,2 +1,2 @@ -IMAGE_TAG=hub.tp229.com:3500/registry:2.7 +IMAGE_TAG=hub.tp229.com:3500/registry:3.0 UI_IMAGE_TAG=hub.tp229.com:3500/cnphpbb/registry-ui:latest \ No newline at end of file From ebc3e533a940579f26d9651647fa5d8194f7fc8f Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 28 Aug 2025 22:07:07 +0800 Subject: [PATCH 07/10] =?UTF-8?q?fix(redis):=20=E6=B7=BB=E5=8A=A0Redis?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E8=AE=A4=E8=AF=81=E5=B9=B6=E9=85=8D=E7=BD=AE?= =?UTF-8?q?Valkey=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为Redis服务添加密码认证参数,同时为Valkey服务配置包括密码、端口、数据库、内存限制等环境变量,增强服务安全性及可配置性 --- dbSer/redis/redis.stack.yml | 2 +- dbSer/redis/valkey.stack.yml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dbSer/redis/redis.stack.yml b/dbSer/redis/redis.stack.yml index 4020d50..5bfcbcf 100644 --- a/dbSer/redis/redis.stack.yml +++ b/dbSer/redis/redis.stack.yml @@ -7,7 +7,7 @@ services: restart: always ports: - '6379:6379' - command: redis-server --appendonly yes + command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD} volumes: - '${Volumes_PATH}/redis:/data' environment: diff --git a/dbSer/redis/valkey.stack.yml b/dbSer/redis/valkey.stack.yml index 6de1f25..e175565 100644 --- a/dbSer/redis/valkey.stack.yml +++ b/dbSer/redis/valkey.stack.yml @@ -9,4 +9,10 @@ services: - '6379:6379' command: valkey-server --appendonly yes --requirepass ${REDIS_PASSWORD} volumes: - - '${Volumes_PATH}/redis:/data' \ No newline at end of file + - '${Volumes_PATH}/redis:/data' + environment: + - REDIS_PASSWORD=${REDIS_PASSWORD} + - REDIS_PORT=6379 + - REDIS_DB=1 + - REDIS_MAXMEMORY=1gb + - REDIS_MAXMEMORYPOLICY=allkeys-lru \ No newline at end of file From aec51d7da2c345bfc5e789d326e7bda653f608cf Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Thu, 28 Aug 2025 22:54:34 +0800 Subject: [PATCH 08/10] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20Redis=208?= =?UTF-8?q?=20=E9=95=9C=E5=83=8F=E7=89=88=E6=9C=AC=E8=87=B3=208.2.1-alpine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbSer/redis/env.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbSer/redis/env.cfg b/dbSer/redis/env.cfg index 678f811..0fb56a0 100644 --- a/dbSer/redis/env.cfg +++ b/dbSer/redis/env.cfg @@ -1,6 +1,6 @@ IMAGE_TAG_REDISV6=redis:6.2.19-alpine IMAGE_TAG_REDISV7=redis:7.2.10-alpine -IMAGE_TAG_REDISV8=redis:8.0.3-alpine +IMAGE_TAG_REDISV8=redis:8.2.1-alpine IMAGE_TAG_VALKEYV8=valkey/valkey:8.1.3-alpine IMAGE_TAG_VALKEYV7=valkey/valkey:7.2.10-alpine Volumes_PATH=/data/volumes/redis From 776bdbd3dff1c2d055edabb20ea04acb8772acf8 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Fri, 29 Aug 2025 22:15:59 +0800 Subject: [PATCH 09/10] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0readme=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=BE=9D=E8=B5=96=E5=AE=89=E8=A3=85=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改readme中的依赖安装步骤,添加虚拟环境创建和使用说明 --- i2c.py/readme.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/i2c.py/readme.md b/i2c.py/readme.md index 32162b3..8c09ba8 100644 --- a/i2c.py/readme.md +++ b/i2c.py/readme.md @@ -5,7 +5,14 @@ apt install -y fonts-wqy-microhei fonts-wqy-zenhei apt install -y i2c-tools libgpiod-dev apt install -y python3-pip python3-pil python3-libgpiod -pip3 install adafruit-circuitpython-ssd13060 --break-system-packages +## 安装依赖 +## 开发环境 +cd i2c.py +python3 -m venv .venv +source .venv/bin/activate +pip3 install adafruit-circuitpython-ssd1306 +## 系统依赖 +pip3 install adafruit-circuitpython-ssd1306 --break-system-packages ``` 2. 调试 From 2f28eb0d239934d3fbaf83ccab4c82afb669fb8d Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Fri, 29 Aug 2025 22:19:44 +0800 Subject: [PATCH 10/10] =?UTF-8?q?docs(i2c.py):=20=E6=9B=B4=E6=96=B0readme?= =?UTF-8?q?=E5=92=8C=E6=B7=BB=E5=8A=A0requirements=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新readme中的依赖安装说明,改用requirements.txt统一管理依赖 添加requirements.txt文件列出项目所需依赖 --- i2c.py/readme.md | 5 +++-- i2c.py/requirements.txt | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 i2c.py/requirements.txt diff --git a/i2c.py/readme.md b/i2c.py/readme.md index 8c09ba8..5ad3ef4 100644 --- a/i2c.py/readme.md +++ b/i2c.py/readme.md @@ -10,9 +10,10 @@ apt install -y python3-pip python3-pil python3-libgpiod cd i2c.py python3 -m venv .venv source .venv/bin/activate -pip3 install adafruit-circuitpython-ssd1306 +# 使用 requirements.txt 安装所有依赖 +pip3 install -r requirements.txt ## 系统依赖 -pip3 install adafruit-circuitpython-ssd1306 --break-system-packages +pip3 install -r requirements.txt --break-system-packages ``` 2. 调试 diff --git a/i2c.py/requirements.txt b/i2c.py/requirements.txt new file mode 100644 index 0000000..b3a2ffe --- /dev/null +++ b/i2c.py/requirements.txt @@ -0,0 +1,4 @@ +# Python dependencies for i2c.py project +adafruit-circuitpython-ssd1306 +adafruit-blinka +Pillow \ No newline at end of file