-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from Guovin/dev
Release:v1.3.3
- Loading branch information
Showing
13 changed files
with
91 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
FROM python:3.8-slim | ||
|
||
WORKDIR /app | ||
ARG APP_WORKDIR=/tv | ||
|
||
COPY . /app | ||
ENV APP_WORKDIR=$APP_WORKDIR | ||
|
||
COPY . $APP_WORKDIR | ||
|
||
WORKDIR $APP_WORKDIR | ||
|
||
RUN pip install -i https://mirrors.aliyun.com/pypi/simple pipenv | ||
|
||
RUN pipenv install | ||
|
||
RUN sed -i '[email protected]@mirrors.aliyun.com@g' /etc/apt/sources.list \ | ||
&& sed -i '[email protected]@mirrors.aliyun.com@g' /etc/apt/sources.list | ||
RUN sed -i "[email protected]@mirrors.aliyun.com@g" /etc/apt/sources.list \ | ||
&& sed -i "[email protected]@mirrors.aliyun.com@g" /etc/apt/sources.list | ||
|
||
RUN apt-get update && apt-get install -y cron | ||
|
||
ARG INSTALL_CHROMIUM=false | ||
|
||
RUN if [ "$INSTALL_CHROMIUM" = "true" ]; then apt-get install -y chromium chromium-driver cron; fi | ||
|
||
RUN (crontab -l 2>/dev/null; echo "0 22 * * * cd /app && pipenv run python main.py scheduled_task") | crontab - | ||
RUN (crontab -l ; echo "0 22 * * * cd $APP_WORKDIR && /usr/local/bin/pipenv run python main.py scheduled_task 2>&1 | tee -a /var/log/tv.log"; echo "0 10 * * * cd $APP_WORKDIR && /usr/local/bin/pipenv run python main.py scheduled_task 2>&1 | tee -a /var/log/tv.log") | crontab - | ||
|
||
EXPOSE 8000 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
COPY entrypoint.sh /tv_entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
RUN chmod +x /tv_entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
ENTRYPOINT /tv_entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
| 配置项 | 默认值 | 描述 | | ||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | ||
| open_update | True | 开启更新,若关闭则只运行结果页面服务 | | ||
| open_driver | False | 开启浏览器运行,较消耗性能 | | ||
| open_proxy | True | 开启代理,自动获取免费可用代理 | | ||
| source_file | "demo.txt" | 模板文件名称 | | ||
| final_file | "result.txt" | 生成文件名称 | | ||
| favorite_list | ["广东珠江","CCTV-1","CCTV-5","CCTV-5+","CCTV-13","广东体育","广东卫视","大湾区卫视","浙江卫视","湖南卫视","翡翠台"] | 关注频道名称列表(仅用于与常规频道区分,自定义获取分页数量) | | ||
| open_online_search | False | 开启线上检索源功能 | | ||
| favorite_page_num | 5 | 关注频道获取分页数量 | | ||
| default_page_num | 3 | 常规频道获取分页数量 | | ||
| urls_limit | 10 | 单个频道接口数量 | | ||
| open_sort | True | 开启排序功能(响应速度、日期、分辨率),若更执行时间较长可关闭此功能 | | ||
| response_time_weight | 0.5 | 响应时间权重值(所有权重值总和应为 1) | | ||
| resolution_weight | 0.5 | 分辨率权重值 (所有权重值总和应为 1) | | ||
| recent_days | 30 | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | | ||
| ipv_type | "ipv4" | 生成结果中接口的类型,可选值:"ipv4"、"ipv6"、"all" | | ||
| domain_blacklist | ["epg.pw"] | 接口域名黑名单,用于过滤低质量含广告类域名的接口 | | ||
| url_keywords_blacklist | [] | 接口关键字黑名单,用于过滤含特定字符的接口 | | ||
| open_subscribe | True | 开启订阅源功能 | | ||
| subscribe_urls | ["https://m3u.ibert.me/txt/fmml_dv6.txt",<br>"https://m3u.ibert.me/txt/o_cn.txt",<br>"https://m3u.ibert.me/txt/j_iptv.txt"] | 订阅源列表 | | ||
| open_multicast | True | 开启组播源功能 | | ||
| region_list | ["all"] | 组播源地区列表,[更多地区](./fofa_map.py),"all"表示所有地区 | | ||
| 配置项 | 默认值 | 描述 | | ||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | | ||
| open_update | True | 开启更新,若关闭则只运行结果页面服务 | | ||
| open_driver | False | 开启浏览器运行,若更新无数据可开启此模式,较消耗性能 | | ||
| open_proxy | True | 开启代理,自动获取免费可用代理,若更新无数据可开启此模式 | | ||
| source_file | "demo.txt" | 模板文件名称 | | ||
| final_file | "result.txt" | 生成文件名称 | | ||
| favorite_list | ["广东珠江","CCTV-1","CCTV-5","CCTV-5+","CCTV-13","广东体育","广东卫视","大湾区卫视","浙江卫视","湖南卫视","翡翠台"] | 关注频道名称列表(仅用于与常规频道区分,自定义获取分页数量) | | ||
| open_online_search | False | 开启线上检索源功能 | | ||
| favorite_page_num | 5 | 关注频道获取分页数量 | | ||
| default_page_num | 3 | 常规频道获取分页数量 | | ||
| urls_limit | 10 | 单个频道接口数量 | | ||
| open_sort | True | 开启排序功能(响应速度、日期、分辨率) | | ||
| response_time_weight | 0.5 | 响应时间权重值(所有权重值总和应为 1) | | ||
| resolution_weight | 0.5 | 分辨率权重值 (所有权重值总和应为 1) | | ||
| recent_days | 30 | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | | ||
| ipv_type | "ipv4" | 生成结果中接口的类型,可选值:"ipv4"、"ipv6"、"all" | | ||
| domain_blacklist | ["epg.pw"] | 接口域名黑名单,用于过滤低质量含广告类域名的接口 | | ||
| url_keywords_blacklist | [] | 接口关键字黑名单,用于过滤含特定字符的接口 | | ||
| open_subscribe | True | 开启订阅源功能 | | ||
| subscribe_urls | ["https://m3u.ibert.me/txt/fmml_dv6.txt",<br>"https://m3u.ibert.me/txt/o_cn.txt",<br>"https://m3u.ibert.me/txt/j_iptv.txt"] | 订阅源列表 | | ||
| open_multicast | True | 开启组播源功能 | | ||
| region_list | ["all"] | 组播源地区列表,[更多地区](./fofa_map.py),"all"表示所有地区 | |
Oops, something went wrong.