diff --git a/Dockerfile b/Dockerfile index 4b00f12..64949d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,7 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -COPY . . - -# 配置文件不打包,由 volumes 挂载 -VOLUME ["/app/config.yaml", "/app/last_notifications.json"] +COPY main.py notifier.py . +COPY config.yaml.example config.yaml CMD ["python", "main.py"] \ No newline at end of file diff --git a/config.yaml.example b/config.yaml.example new file mode 100644 index 0000000..a82966b --- /dev/null +++ b/config.yaml.example @@ -0,0 +1,18 @@ +monitor: + frequency_minutes: 30 + +sites: + - name: "物理与电子科学学院" + url: "https://www.csust.edu.cn/wdxy/xytz.htm" + encoding: "utf-8" + - name: "教务处" + url: "https://www.csust.edu.cn/jwc/index/tzgg.htm" + encoding: "utf-8" + +notification: + smtp_host: "smtp.163.com" + smtp_port: 25 + smtp_user: "your_email@163.com" + smtp_password: "your_password" + to_email: "notify@example.com" + use_tls: true \ No newline at end of file