fix docker
This commit is contained in:
@@ -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"]
|
||||
18
config.yaml.example
Normal file
18
config.yaml.example
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user