Перевод checker и docs на контейнеры

This commit is contained in:
2025-11-23 01:40:42 +08:00
parent bdbd9f9e57
commit 448eada6e9
5 changed files with 58 additions and 99 deletions

View File

@@ -1,30 +0,0 @@
#!/bin/bash
echo "CHECKER_WAIT=$CHECKER_WAIT"
echo "CHECKER_INIFILE=$CHECKER_INIFILE"
echo "CHECKER_TAGFILE=$CHECKER_TAGFILE"
binary="$PWD/bin/iptvc"
if [ ! -f "$binary" ]; then
echo "Downloading latest iptvc..."
wget https://git.axenov.dev/IPTV/iptvc/releases/download/latest/linux_amd64.zip
[ ! -d "$PWD/bin" ] && mkdir "$PWD/bin"
unzip -o linux_amd64.zip -d "$PWD/bin"
rm -rf linux_amd64.zip
fi
if [ ! -f "$binary" ]; then
echo "Not found: $binary"
exit 1
fi
$binary version
args="check -i $CHECKER_INIFILE -t $CHECKER_TAGFILE"
while true; do
echo
echo "Running: $binary $args"
$binary $args
echo "Waiting $CHECKER_WAIT seconds"
sleep $CHECKER_WAIT
done

View File

@@ -1,5 +1,5 @@
server {
server_name iptv.local;
server_name m3u-su.local;
listen 80;
index index.html index.php;
# access_log /var/log/nginx/access.log;
@@ -22,14 +22,14 @@ server {
}
location ^~ /docs/ {
alias /usr/share/nginx/html/doc-files/;
index index.html;
# access_log /var/log/nginx/docs_access.log;
error_log /var/log/nginx/docs_error.log warn;
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public";
}
proxy_pass http://docs:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
}
location / {
@@ -48,6 +48,8 @@ server {
fastcgi_hide_header X-Powered-By;
fastcgi_read_timeout 300;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
include fastcgi_params;
location ~* \.(jpg|jpeg|gif|css|png|ttf|woff|svg|js|ico)$ {
access_log off;