sansan 6 kuukautta sitten
vanhempi
sitoutus
d989037f61
6 muutettua tiedostoa jossa 24 lisäystä ja 24 poistoa
  1. 1 1
      .github/workflows/docker.yml
  2. 5 3
      docker/.env
  3. 13 14
      docker/Dockerfile
  4. 1 1
      main.py
  5. 3 4
      readme.md
  6. 1 1
      version

+ 1 - 1
.github/workflows/docker.yml

@@ -49,7 +49,7 @@ jobs:
         with:
           context: .
           file: ./docker/Dockerfile
-          platforms: linux/amd64,linux/arm64
+          platforms: linux/amd64,linux/arm64,linux/arm/v7
           push: true
           tags: ${{ steps.meta.outputs.tags }}
           labels: ${{ steps.meta.outputs.labels }}

+ 5 - 3
docker/.env

@@ -12,9 +12,11 @@ EMAIL_SMTP_SERVER=
 EMAIL_SMTP_PORT=
 
 # ntfy 推送配置
-NTFY_SERVER_URL=https://ntfy.sh  # 默认使用公共服务,可改为自托管地址
-NTFY_TOPIC=                       # ntfy主题名称
-NTFY_TOKEN=                       # 可选:访问令牌(用于私有主题)
+NTFY_SERVER_URL=https://ntfy.sh
+# ntfy主题名称
+NTFY_TOPIC=
+# 可选:访问令牌(用于私有主题)
+NTFY_TOKEN=
 
 # 运行配置
 CRON_SCHEDULE=*/30 * * * * # 定时任务表达式,每 30 分钟执行一次(比如 8点,8点半,9点,9点半这种时间规律执行)

+ 13 - 14
docker/Dockerfile

@@ -8,13 +8,7 @@ ENV SUPERCRONIC_VERSION=v0.2.34
 
 RUN set -ex && \
     apt-get update && \
-    # 添加 locales 包
-    apt-get install -y --no-install-recommends curl ca-certificates locales && \
-    # 配置中文 locale
-    sed -i -e 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && \
-    sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
-    locale-gen && \
-    # 下载 supercronic(只支持 amd64 和 arm64)
+    apt-get install -y --no-install-recommends curl ca-certificates && \
     case ${TARGETARCH} in \
     amd64) \
     export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-amd64; \
@@ -26,8 +20,18 @@ RUN set -ex && \
     export SUPERCRONIC_SHA1SUM=4ab6343b52bf9da592e8b4bb7ae6eb5a8e21b71e; \
     export SUPERCRONIC=supercronic-linux-arm64; \
     ;; \
+    arm) \
+    export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-arm; \
+    export SUPERCRONIC_SHA1SUM=4ba4cd0da62082056b6def085fa9377d965fbe01; \
+    export SUPERCRONIC=supercronic-linux-arm; \
+    ;; \
+    386) \
+    export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-386; \
+    export SUPERCRONIC_SHA1SUM=80b4fff03a8d7bf2f24a1771f37640337855e949; \
+    export SUPERCRONIC=supercronic-linux-386; \
+    ;; \
     *) \
-    echo "Unsupported architecture: ${TARGETARCH}. Only amd64 and arm64 are supported."; \
+    echo "Unsupported architecture: ${TARGETARCH}"; \
     exit 1; \
     ;; \
     esac && \
@@ -71,13 +75,8 @@ RUN sed -i 's/\r$//' /entrypoint.sh.tmp && \
     chmod +x manage.py && \
     mkdir -p /app/config /app/output
 
-# 添加 locale 相关环境变量
 ENV PYTHONUNBUFFERED=1 \
     CONFIG_PATH=/app/config/config.yaml \
-    FREQUENCY_WORDS_PATH=/app/config/frequency_words.txt \
-    LANG=zh_CN.UTF-8 \
-    LANGUAGE=zh_CN:zh:en_US:en \
-    LC_ALL=zh_CN.UTF-8 \
-    PYTHONIOENCODING=utf-8
+    FREQUENCY_WORDS_PATH=/app/config/frequency_words.txt
 
 ENTRYPOINT ["/entrypoint.sh"]

+ 1 - 1
main.py

@@ -20,7 +20,7 @@ import requests
 import yaml
 
 
-VERSION = "3.0.1"
+VERSION = "3.0.2"
 
 
 # === SMTP邮件配置 ===

+ 3 - 4
readme.md

@@ -11,7 +11,7 @@
 [![GitHub Stars](https://img.shields.io/github/stars/sansan0/TrendRadar?style=flat-square&logo=github&color=yellow)](https://github.com/sansan0/TrendRadar/stargazers)
 [![GitHub Forks](https://img.shields.io/github/forks/sansan0/TrendRadar?style=flat-square&logo=github&color=blue)](https://github.com/sansan0/TrendRadar/network/members)
 [![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat-square)](LICENSE)
-[![Version](https://img.shields.io/badge/version-v3.0.1-green.svg?style=flat-square)](https://github.com/sansan0/TrendRadar)
+[![Version](https://img.shields.io/badge/version-v3.0.2-green.svg?style=flat-square)](https://github.com/sansan0/TrendRadar)
 
 [![企业微信通知](https://img.shields.io/badge/企业微信-通知-00D4AA?style=flat-square)](https://work.weixin.qq.com/)
 [![Telegram通知](https://img.shields.io/badge/Telegram-通知-00D4AA?style=flat-square)](https://telegram.org/)
@@ -500,11 +500,10 @@ GitHub 一键 Fork 即可使用,无需编程基础。
 - **小版本更新**:从 v2.x 升级到 v2.y, 用本项目的 `main.py` 代码替换你 fork 仓库中的对应文件
 - **大版本升级**:从 v1.x 升级到 v2.y, 建议删除现有 fork 后重新 fork,这样更省力且避免配置冲突
 
-### 2025/10/21 - v3.0.1
+### 2025/10/21 - v3.0.2
 
 - **更新内容**:
-    - 尝试修复 ntfy 推送编码问题 + 2
-    - docker 移除对 linux/arm/v7 架构的支持
+    - 必然修复 ntfy 推送编码问题
 
 ### 2025/10/20 - v3.0.0
 

+ 1 - 1
version

@@ -1 +1 @@
-3.0.0
+3.0.2