add delay option
All checks were successful
Build docker container / build (push) Successful in 6m12s
All checks were successful
Build docker container / build (push) Successful in 6m12s
This commit is contained in:
parent
e080a976a6
commit
ab9a8d7160
@ -4,6 +4,7 @@ ARG GIT_BRANCH=master
|
|||||||
ENV CRON_SCHEDULE="0 0,12 * * *"
|
ENV CRON_SCHEDULE="0 0,12 * * *"
|
||||||
ENV API_URL="https://iptv-org.github.io/api"
|
ENV API_URL="https://iptv-org.github.io/api"
|
||||||
ENV DAYS=14
|
ENV DAYS=14
|
||||||
|
ENV DELAY=0
|
||||||
ENV MAX_CONNECTIONS=10
|
ENV MAX_CONNECTIONS=10
|
||||||
ENV ENABLE_FIXES=false
|
ENV ENABLE_FIXES=false
|
||||||
ARG BIN_FOLDER=/bin
|
ARG BIN_FOLDER=/bin
|
||||||
@ -57,5 +58,5 @@ RUN chmod +x "$START_SCRIPT" \
|
|||||||
&& apk del git curl \
|
&& apk del git curl \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
ENTRYPOINT bash $START_SCRIPT chron-schedule="$CRON_SCHEDULE" work-dir="$WORKDIR" days="$DAYS" max_connections="$MAX_CONNECTIONS" enable_fixes="$ENABLE_FIXES" api_url="$API_URL"
|
ENTRYPOINT bash $START_SCRIPT chron-schedule="$CRON_SCHEDULE" work-dir="$WORKDIR" days="$DAYS" delay=$DELAY max_connections="$MAX_CONNECTIONS" enable_fixes="$ENABLE_FIXES" api_url="$API_URL"
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
@ -56,6 +56,7 @@ It is recommended that you take existing provider code as a base for your custom
|
|||||||
|-------------------------------|----------------------------------------------------------------------------|----------------------------------|
|
|-------------------------------|----------------------------------------------------------------------------|----------------------------------|
|
||||||
| CRON_SCHEDULE | CRON expression describing the recurrence for epg retrieval. | `0 0,12 * * *` |
|
| CRON_SCHEDULE | CRON expression describing the recurrence for epg retrieval. | `0 0,12 * * *` |
|
||||||
| DAYS | Describes the desired amount of days in the future for for epg retrieval. | 14 |
|
| DAYS | Describes the desired amount of days in the future for for epg retrieval. | 14 |
|
||||||
|
| DELAY | Delay between requests in milliseconds | 0 |
|
||||||
| MAX_CONNECTIONS | The maximum amount of parallel connections that can be established | 10 |
|
| MAX_CONNECTIONS | The maximum amount of parallel connections that can be established | 10 |
|
||||||
| ENABLE_FIXES | Some fixes to providers take a long time to be merged into the main branch.<br>When this option is enabled some of these fixes will also be included.<br>The source code for these fixes can be seen under the `fixes` folder.<br> Recreate the container when changing this variable in order for it to take effect | false |
|
| ENABLE_FIXES | Some fixes to providers take a long time to be merged into the main branch.<br>When this option is enabled some of these fixes will also be included.<br>The source code for these fixes can be seen under the `fixes` folder.<br> Recreate the container when changing this variable in order for it to take effect | false |
|
||||||
| API_URL | The endpoint where channel information will be grabbed | `https://iptv-org.github.io/api` |
|
| API_URL | The endpoint where channel information will be grabbed | `https://iptv-org.github.io/api` |
|
||||||
@ -212,3 +213,5 @@ Sometimes a new version of this image will be bound to the same source commit. T
|
|||||||
[04-04-2025](https://github.com/iptv-org/epg/commit/4df25c92bcad1e4892640f532eae71cf9f5e7b95)<br>Includes fixes for new configuration changes
|
[04-04-2025](https://github.com/iptv-org/epg/commit/4df25c92bcad1e4892640f532eae71cf9f5e7b95)<br>Includes fixes for new configuration changes
|
||||||
- 1.0.60
|
- 1.0.60
|
||||||
[04-07-2025](https://github.com/iptv-org/epg/commit/7e1fbcbe154f4efd5c81341351cceb06f71b79a0)
|
[04-07-2025](https://github.com/iptv-org/epg/commit/7e1fbcbe154f4efd5c81341351cceb06f71b79a0)
|
||||||
|
- 1.0.61
|
||||||
|
[04-07-2025](https://github.com/iptv-org/epg/commit/7e1fbcbe154f4efd5c81341351cceb06f71b79a0)<br>Add delay option
|
4
start.sh
4
start.sh
@ -6,6 +6,7 @@ for arg in "$@"; do
|
|||||||
chron-schedule=*) chron_schedule="${arg#*=}" ;;
|
chron-schedule=*) chron_schedule="${arg#*=}" ;;
|
||||||
work-dir=*) work_dir="${arg#*=}" ;;
|
work-dir=*) work_dir="${arg#*=}" ;;
|
||||||
days=*) days="${arg#*=}" ;;
|
days=*) days="${arg#*=}" ;;
|
||||||
|
delay=*) delay="${arg#*=}" ;;
|
||||||
max_connections=*) max_connections="${arg#*=}" ;;
|
max_connections=*) max_connections="${arg#*=}" ;;
|
||||||
enable_fixes=*) enable_fixes="${arg#*=}" ;;
|
enable_fixes=*) enable_fixes="${arg#*=}" ;;
|
||||||
api_url=*) api_url="${arg#*=}" ;;
|
api_url=*) api_url="${arg#*=}" ;;
|
||||||
@ -16,6 +17,7 @@ echo "chron_schedule : ${chron_schedule}"
|
|||||||
cd $work_dir
|
cd $work_dir
|
||||||
echo "working dir : " $(pwd)
|
echo "working dir : " $(pwd)
|
||||||
echo "days : ${days}"
|
echo "days : ${days}"
|
||||||
|
echo "delay : ${delay}"
|
||||||
echo "max_connections : ${max_connections}"
|
echo "max_connections : ${max_connections}"
|
||||||
echo "enable_fixes : ${enable_fixes}"
|
echo "enable_fixes : ${enable_fixes}"
|
||||||
echo "api url : ${api_url}"
|
echo "api url : ${api_url}"
|
||||||
@ -27,4 +29,4 @@ fi
|
|||||||
sed -i -E "s/(https:\x2f\x2fiptv-org.github.io\x2fapi$\123filename\125)/$api_url$\123filename\125/g" $work_dir/scripts/core/apiClient.ts
|
sed -i -E "s/(https:\x2f\x2fiptv-org.github.io\x2fapi$\123filename\125)/$api_url$\123filename\125/g" $work_dir/scripts/core/apiClient.ts
|
||||||
ln -s $work_dir/guide.xml /public/guide.xml
|
ln -s $work_dir/guide.xml /public/guide.xml
|
||||||
ln -s $work_dir/guide.xml.gz /public/guide.xml.gz
|
ln -s $work_dir/guide.xml.gz /public/guide.xml.gz
|
||||||
pm2-runtime pm2.config.js --name epg --node-args="--no-autorestart --cron-restart="$chron_schedule" --maxConnections=$max_connections --days=$days"
|
pm2-runtime pm2.config.js --name epg --node-args="--no-autorestart --cron-restart="$chron_schedule" --maxConnections=$max_connections --days=$days --delay=$delay"
|
Loading…
x
Reference in New Issue
Block a user