mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 01:45:40 -04:00
chore: clean up app
This commit is contained in:
0
.all-contributorsrc
Normal file → Executable file
0
.all-contributorsrc
Normal file → Executable file
0
.editorconfig
Normal file → Executable file
0
.editorconfig
Normal file → Executable file
0
.gitattributes
vendored
Normal file → Executable file
0
.gitattributes
vendored
Normal file → Executable file
0
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file → Executable file
0
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file → Executable file
0
.github/changelog-configuration.json
vendored
Normal file → Executable file
0
.github/changelog-configuration.json
vendored
Normal file → Executable file
0
.github/dependabot.yml
vendored
Normal file → Executable file
0
.github/dependabot.yml
vendored
Normal file → Executable file
0
.github/labeler.yml
vendored
Normal file → Executable file
0
.github/labeler.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-clean.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-clean.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-all.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-all.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-dockerhub.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-dockerhub.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-gitea.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-gitea.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-github.yml
vendored
Normal file → Executable file
0
.github/workflows/deploy-docker-github.yml
vendored
Normal file → Executable file
0
.github/workflows/issues-new.yml
vendored
Normal file → Executable file
0
.github/workflows/issues-new.yml
vendored
Normal file → Executable file
0
.github/workflows/issues-scan.yml
vendored
Normal file → Executable file
0
.github/workflows/issues-scan.yml
vendored
Normal file → Executable file
0
.github/workflows/issues-stale.yml
vendored
Normal file → Executable file
0
.github/workflows/issues-stale.yml
vendored
Normal file → Executable file
0
.github/workflows/labels-clean.yml
vendored
Normal file → Executable file
0
.github/workflows/labels-clean.yml
vendored
Normal file → Executable file
0
.github/workflows/labels-create.yml
vendored
Normal file → Executable file
0
.github/workflows/labels-create.yml
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
45
Dockerfile
45
Dockerfile
@@ -57,10 +57,9 @@ LABEL BUILDVERSION="TVApp2 v${VERSION} Build ${BUILDDATE}"
|
||||
# #
|
||||
|
||||
ENV TZ="Etc/UTC"
|
||||
ENV URL_REPO_BASE="https://github.com/aetherinox/alpine-base/pkgs/container/alpine-base"
|
||||
ENV URL_REPO_APP="https://git.binaryninja.net/BinaryNinja/tvapp2"
|
||||
ENV FILE_NAME="index.html"
|
||||
ENV PORT_HTTP=4124
|
||||
ENV URL_REPO="https://git.binaryninja.net/BinaryNinja/"
|
||||
ENV WEB_IP="0.0.0.0"
|
||||
ENV WEB_PORT=4124
|
||||
ENV NODE_VERSION=18.20.5
|
||||
ENV YARN_VERSION=1.22.22
|
||||
|
||||
@@ -83,16 +82,22 @@ RUN \
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
# #
|
||||
# Set work directory
|
||||
# copy s6-overlays root to image root
|
||||
# #
|
||||
|
||||
COPY root/ /
|
||||
|
||||
# #
|
||||
# set work directory
|
||||
# #
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# #
|
||||
# copy node package.json to workdir
|
||||
# copy tvapp2 project to workdir
|
||||
# #
|
||||
|
||||
COPY package*.json ./
|
||||
COPY tvapp2/ ./
|
||||
|
||||
# #
|
||||
# install node (production)
|
||||
@@ -100,35 +105,17 @@ COPY package*.json ./
|
||||
|
||||
RUN npm install --only=production
|
||||
|
||||
# #
|
||||
# Add local files
|
||||
# #
|
||||
|
||||
COPY . .
|
||||
# COPY node_modules/ package.json package-lock.json formatted.dat index.js ./
|
||||
|
||||
# #
|
||||
# when copying with the command above, all files in root folder will be copied.
|
||||
# #
|
||||
|
||||
RUN rm -rf ./root
|
||||
RUN rm ./Dockerfile ./Dockerfile.aarch64 docker-entrypoint.sh
|
||||
|
||||
# #
|
||||
# copy s6-overlays root to image root
|
||||
# #
|
||||
|
||||
COPY root/ /
|
||||
|
||||
# #
|
||||
# Ports and volumes
|
||||
# #
|
||||
|
||||
EXPOSE ${PORT_HTTP}/tcp
|
||||
EXPOSE ${WEB_PORT}/tcp
|
||||
|
||||
# #
|
||||
# In case user sets up the cron for a longer duration, do a first run
|
||||
# and then keep the container running. Hacky, but whatever.
|
||||
# #
|
||||
|
||||
CMD ["sh", "-c", "npm start"]
|
||||
#CMD ["npm start"]
|
||||
|
||||
ENTRYPOINT ["/init"]
|
||||
|
||||
18
docker-compose.yml
Executable file
18
docker-compose.yml
Executable file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
|
||||
tvapp2:
|
||||
container_name: ${TVAPP2CONTAINER_NAME:-tvapp2}
|
||||
# image: ghcr.io/aetherinox/tvapp2:latest
|
||||
image: tvapp2:latest
|
||||
hostname: tvapp2
|
||||
environment:
|
||||
TZ: "Etc/UTC"
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./config:/config
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
@@ -1,13 +0,0 @@
|
||||
-----BEGIN DH PARAMETERS-----
|
||||
MIICCAKCAgEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
|
||||
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
|
||||
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
|
||||
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
|
||||
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
|
||||
ssbzSibBsu/6iGtCOGEfz9zeNVs7ZRkDW7w09N75nAI4YbRvydbmyQd62R0mkff3
|
||||
7lmMsPrBhtkcrv4TCYUTknC0EwyTvEN5RPT9RFLi103TZPLiHnH1S/9croKrnJ32
|
||||
nuhtK8UiNjoNq8Uhl5sN6todv5pC1cRITgq80Gv6U93vPBsg7j/VnXwl5B0rZp4e
|
||||
8W5vUsMWTfT7eTDp5OWIV7asfV9C1p9tGHdjzx1VA0AEh/VbpX4xzHpxNciG77Qx
|
||||
iu1qHgEtnmgyqQdgCpGBMMRtx3j5ca0AOAkpmaMzy4t6Gh25PXFAADwqTs6p+Y0K
|
||||
zAqCkc3OyX3Pjsm1Wn+IpGtNtahR9EGC4caKAH5eZV9q//////////8CAQI=
|
||||
-----END DH PARAMETERS-----
|
||||
@@ -1,91 +0,0 @@
|
||||
# #
|
||||
# @project TVApp2
|
||||
# @usage Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @file nginx.conf.sample
|
||||
# @repo.1 https://github.com/TheBinaryNinja/tvapp2
|
||||
# @repo.2 https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
# @repo.3 https://github.com/aetherinox/docker-base-alpine
|
||||
# #
|
||||
|
||||
user dockerx;
|
||||
|
||||
# Set number of worker processes automatically based on number of CPU cores.
|
||||
include /config/nginx/worker_processes.conf;
|
||||
|
||||
# Enables the use of JIT for regular expressions to speed-up their processing.
|
||||
pcre_jit on;
|
||||
|
||||
# Configures default error logger.
|
||||
error_log /config/log/nginx/error.log;
|
||||
|
||||
# Includes files with directives to load dynamic modules.
|
||||
include /etc/nginx/modules/*.conf;
|
||||
|
||||
# Include files with config snippets into the root context.
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
events
|
||||
{
|
||||
# The maximum number of simultaneous connections that can be opened by
|
||||
# a worker process.
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http
|
||||
{
|
||||
# Includes mapping of file name extensions to MIME types of responses
|
||||
# and defines the default type.
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Name servers used to resolve names of upstream servers into addresses.
|
||||
# It's also needed when using tcpsocket and udpsocket in Lua modules.
|
||||
# resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001;
|
||||
include /config/nginx/resolver.conf;
|
||||
|
||||
# Don't tell nginx version to the clients. Default is 'on'.
|
||||
server_tokens off;
|
||||
|
||||
# Specifies the maximum accepted body size of a client request, as
|
||||
# indicated by the request header Content-Length. If the stated content
|
||||
# length is greater than this size, then the client receives the HTTP
|
||||
# error code 413. Set to 0 to disable. Default is '1m'.
|
||||
client_max_body_size 0;
|
||||
|
||||
# Sendfile copies data between one FD and other from within the kernel,
|
||||
# which is more efficient than read() + write(). Default is off.
|
||||
sendfile on;
|
||||
|
||||
# Causes nginx to attempt to send its HTTP response head in one packet,
|
||||
# instead of using partial frames. Default is 'off'.
|
||||
tcp_nopush on;
|
||||
|
||||
# all ssl related config moved to ssl.conf
|
||||
# included in server blocks where listen 443 is defined
|
||||
|
||||
# Enable gzipping of responses.
|
||||
# gzip on;
|
||||
|
||||
# Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'.
|
||||
gzip_vary on;
|
||||
|
||||
# Helper variable for proxying websockets.
|
||||
map $http_upgrade $connection_upgrade
|
||||
{
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
# Enable http2 by default for all servers
|
||||
http2 on;
|
||||
|
||||
# Sets the path, format, and configuration for a buffered log write.
|
||||
access_log /config/log/nginx/access.log;
|
||||
|
||||
# Includes virtual hosts configs.
|
||||
include /etc/nginx/http.d/*.conf;
|
||||
include /config/nginx/site-confs/*.conf;
|
||||
}
|
||||
|
||||
daemon off;
|
||||
pid /run/nginx.pid;
|
||||
@@ -1,82 +0,0 @@
|
||||
# #
|
||||
# @project TVApp2
|
||||
# @usage Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @file default.conf.sample
|
||||
# @repo.1 https://github.com/TheBinaryNinja/tvapp2
|
||||
# @repo.2 https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
# @repo.3 https://github.com/aetherinox/docker-base-alpine
|
||||
# #
|
||||
|
||||
server
|
||||
{
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
listen 443 ssl default_server;
|
||||
listen [::]:443 ssl default_server;
|
||||
|
||||
server_name _;
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
set $root /app/www/public;
|
||||
if (!-d /app/www/public)
|
||||
{
|
||||
set $root /config/www;
|
||||
}
|
||||
|
||||
root $root;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
location /
|
||||
{
|
||||
# enable for basic auth
|
||||
#auth_basic "Restricted";
|
||||
#auth_basic_user_file /config/nginx/.htpasswd;
|
||||
|
||||
# index > fancy
|
||||
fancyindex on;
|
||||
fancyindex_header "/theme/header.html";
|
||||
fancyindex_footer "/theme/footer.html";
|
||||
fancyindex_ignore "theme";
|
||||
fancyindex_time_format "%m-%d-%Y %T";
|
||||
fancyindex_name_length 255;
|
||||
fancyindex_show_dotfiles off;
|
||||
fancyindex_hide_symlinks on;
|
||||
fancyindex_default_sort name;
|
||||
|
||||
# index > auto
|
||||
autoindex_exact_size off;
|
||||
autoindex_format html;
|
||||
autoindex_localtime on;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_types text/css text/javascript text/xml application/atom+xml application/rss+xml text/markdown text/mathml text/plain text/vnd.sun.j2me.app-descriptor text/vnd.wap.wml text/x-component application/json application/xhtml+xml application/xspf+xml font/woff font/woff2 image/avif image/bmp image/png image/svg+xml image/tiff image/vnd.wap.wbmp image/webp image/x-icon image/x-jng audio/midi audio/mpeg audio/ogg audio/x-m4a audio/x-realaudio;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 1;
|
||||
gzip_http_version 1.0;
|
||||
gunzip on;
|
||||
gzip_static on;
|
||||
|
||||
try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^(.+\.php)(.*)$
|
||||
{
|
||||
# enable the next two lines for http auth
|
||||
#auth_basic "Restricted";
|
||||
#auth_basic_user_file /config/nginx/.htpasswd;
|
||||
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) { return 404; }
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
# deny access to .htaccess/.htpasswd files
|
||||
location ~ /\.ht
|
||||
{
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
# #
|
||||
# @project TVApp2
|
||||
# @usage Automatic m3u and xml guide updater for TheTvApp, TVPass, and MoveOnJoy utilized within your IPTV client.
|
||||
# @file nginx.conf.sample
|
||||
# @repo.1 https://github.com/TheBinaryNinja/tvapp2
|
||||
# @repo.2 https://git.binaryninja.net/BinaryNinja/tvapp2
|
||||
# @repo.3 https://github.com/aetherinox/docker-base-alpine
|
||||
# #
|
||||
|
||||
# #
|
||||
# generated 2023-06-25, Mozilla Guideline v5.7, nginx 1.24.0, OpenSSL 3.1.1, intermediate configuration
|
||||
# https://ssl-config.mozilla.org/#server=nginx&version=1.24.0&config=intermediate&openssl=3.1.1&guideline=5.7
|
||||
# #
|
||||
|
||||
ssl_certificate /config/keys/cert.crt;
|
||||
ssl_certificate_key /config/keys/cert.key;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
||||
ssl_session_tickets off;
|
||||
|
||||
# #
|
||||
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam
|
||||
# #
|
||||
|
||||
ssl_dhparam /config/nginx/dhparams.pem;
|
||||
|
||||
# #
|
||||
# intermediate configuration
|
||||
# #
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# #
|
||||
# OCSP stapling
|
||||
# #
|
||||
|
||||
# ssl_stapling on;
|
||||
# ssl_stapling_verify on;
|
||||
|
||||
# #
|
||||
# verify chain of trust of OCSP response using Root CA and Intermediate certs
|
||||
# #
|
||||
|
||||
# ssl_trusted_certificate /config/keys/cert.crt;
|
||||
|
||||
# #
|
||||
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
|
||||
# #
|
||||
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains" always;
|
||||
|
||||
# #
|
||||
# Optional additional headers
|
||||
# #
|
||||
|
||||
# add_header Cache-Control "no-transform" always;
|
||||
# add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'" always;
|
||||
# add_header Permissions-Policy "interest-cohort=()" always;
|
||||
# add_header Referrer-Policy "same-origin" always;
|
||||
# add_header X-Content-Type-Options "nosniff" always;
|
||||
# add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
# add_header X-UA-Compatible "IE=Edge" always;
|
||||
# add_header X-XSS-Protection "1; mode=block" always;
|
||||
@@ -1,14 +0,0 @@
|
||||
/config/log/nginx/*.log {
|
||||
weekly
|
||||
rotate 14
|
||||
compress
|
||||
delaycompress
|
||||
nodateext
|
||||
notifempty
|
||||
missingok
|
||||
sharedscripts
|
||||
postrotate
|
||||
s6-svc -1 /run/service/svc-nginx
|
||||
endscript
|
||||
su dockerx dockerx
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/config/log/php/*.log {
|
||||
rotate 7
|
||||
weekly
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
compress
|
||||
nodateext
|
||||
sharedscripts
|
||||
postrotate
|
||||
s6-svc -t /run/service/svc-php-fpm
|
||||
endscript
|
||||
su dockerx dockerx
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
include /config/nginx/nginx.conf;
|
||||
@@ -24,14 +24,14 @@ echo " User:Group $(id -u dockerx):$(id -g dockerx)"
|
||||
else
|
||||
echo " User:Group $(stat /run -c %u):$(stat /run -c %g)"
|
||||
fi
|
||||
echo " Port(s) $(echo $PORT_HTTP)"
|
||||
echo " Port(s) $(echo $WEB_PORT)"
|
||||
echo " Gateway $(echo $IP_GATEWAY)"
|
||||
echo " Web Server $(echo $IP_CONTAINER:$PORT_HTTP)"
|
||||
echo " Web Server $(echo $IP_CONTAINER:$WEB_PORT)"
|
||||
echo ""
|
||||
echo '──────────────────────────────────────────────────────────────────────────────────────────'
|
||||
|
||||
if [[ -z ${TVAPP_READ_ONLY_FS} ]] && [[ -z ${TVAPP_NON_ROOT_USER} ]]; then
|
||||
aetherxown dockerx:dockerx /app
|
||||
aetherxown dockerx:dockerx /config
|
||||
aetherxown dockerx:dockerx /defaults
|
||||
aetherxown dockerx:dockerx /usr/src/app
|
||||
fi
|
||||
|
||||
@@ -3,9 +3,5 @@
|
||||
|
||||
# make folders
|
||||
mkdir -p \
|
||||
/config/{keys,php,www} \
|
||||
/config/log/{nginx,php} \
|
||||
/config/nginx/site-confs \
|
||||
/config/keys \
|
||||
/run \
|
||||
/var/lib/nginx/tmp/client_body \
|
||||
/var/tmp/nginx
|
||||
|
||||
@@ -18,5 +18,8 @@ else
|
||||
rm -f \
|
||||
/config/keys/cert.key \
|
||||
/config/keys/cert.crt || true
|
||||
openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT"
|
||||
|
||||
mkdir -p /config/keys
|
||||
|
||||
OUT=$(openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT" 2>/dev/null)
|
||||
fi
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
# This file doesn't do anything, it's just the end of the nginx base init process
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-nginx/run
|
||||
@@ -3,23 +3,4 @@
|
||||
|
||||
# permissions
|
||||
aetherxown -R dockerx:dockerx \
|
||||
/var/lib/nginx \
|
||||
/var/tmp/nginx
|
||||
|
||||
aetherxown -R dockerx:dockerx \
|
||||
/config/keys \
|
||||
/config/log \
|
||||
/config/nginx \
|
||||
/config/php
|
||||
|
||||
aetherxown dockerx:dockerx \
|
||||
/config/www
|
||||
|
||||
chmod -R g+w \
|
||||
/config/nginx
|
||||
|
||||
chmod -R 644 /etc/logrotate.d
|
||||
|
||||
if [[ -f "/config/log/logrotate.status" ]]; then
|
||||
chmod 600 /config/log/logrotate.status
|
||||
fi
|
||||
/config/keys
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# precreate log files
|
||||
if [[ ! -f /config/log/php/error.log ]]; then
|
||||
touch /config/log/php/error.log
|
||||
fi
|
||||
|
||||
# set default timezone
|
||||
if [[ -f /etc/php83/conf.d/30_timezone.ini ]]; then
|
||||
printf "date.timezone = %s\\n" "${TZ:-UTC}" >/etc/php83/conf.d/30_timezone.ini
|
||||
fi
|
||||
|
||||
# create local php.ini if it doesn't exist, set local timezone
|
||||
if [[ ! -f /config/php/php-local.ini ]]; then
|
||||
printf "; Edit this file to override php.ini directives\\n\\n" >/config/php/php-local.ini
|
||||
fi
|
||||
|
||||
# symlink user php-local.ini to image
|
||||
rm -rf /etc/php83/conf.d/php-local.ini
|
||||
rm -rf /etc/php83/conf.d/zzz_php-local.ini
|
||||
|
||||
if [[ -f /config/php/php-local.ini ]] && [ -d /etc/php83/conf.d ]; then
|
||||
ln -s /config/php/php-local.ini /etc/php83/conf.d/zzz_php-local.ini
|
||||
fi
|
||||
|
||||
# create override for www.conf if it doesn't exist
|
||||
if [[ ! -f /config/php/www2.conf ]]; then
|
||||
printf "; Edit this file to override www.conf and php-fpm.conf directives and restart the container\\n\\n; Pool name\\n[www]\\n\\n" >/config/php/www2.conf
|
||||
fi
|
||||
|
||||
# copy user www2.conf to image
|
||||
if [[ -f /config/php/www2.conf ]] && [ -d /etc/php83/conf.d ]; then
|
||||
cp /config/php/www2.conf /etc/php83/php-fpm.d/www2.conf
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
oneshot
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-php/run
|
||||
@@ -2,23 +2,23 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
# detect nginx configs with dates not matching the provided sample files
|
||||
active_confs=$(find /config/nginx/ -name "*.conf" -type f 2>/dev/null)
|
||||
# active_confs=$(find /config/nginx/ -name "*.conf" -type f 2>/dev/null)
|
||||
|
||||
for i in ${active_confs}; do
|
||||
if [ -f "${i}.sample" ]; then
|
||||
if [ "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}")" != "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}.sample")" ]; then
|
||||
active_confs_changed="│ $(printf '%10s' "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}" | tr / -)") │ $(printf '%10s' "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}.sample" | tr / -)") │ $(printf '%-70s' "${i}") │\n${active_confs_changed}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# for i in ${active_confs}; do
|
||||
# if [ -f "${i}.sample" ]; then
|
||||
# if [ "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}")" != "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}.sample")" ]; then
|
||||
# active_confs_changed="│ $(printf '%10s' "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}" | tr / -)") │ $(printf '%10s' "$(sed -nE 's|^## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' "${i}.sample" | tr / -)") │ $(printf '%-70s' "${i}") │\n${active_confs_changed}"
|
||||
# fi
|
||||
# fi
|
||||
# done
|
||||
|
||||
# detect site-confs with wrong extension
|
||||
site_confs_wrong_ext=$(find /config/nginx/site-confs/ -type f -not -name "*.conf" -not -name "*.conf.sample" 2>/dev/null)
|
||||
# site_confs_wrong_ext=$(find /config/nginx/site-confs/ -type f -not -name "*.conf" -not -name "*.conf.sample" 2>/dev/null)
|
||||
|
||||
if [ -n "${site_confs_wrong_ext}" ]; then
|
||||
echo "**** The following site-confs have extensions other than .conf ****"
|
||||
echo "**** This may be due to user customization. ****"
|
||||
echo "**** You should review the files and rename them to use the .conf extension or remove them. ****"
|
||||
echo "**** nginx.conf will only include site-confs with the .conf extension. ****"
|
||||
echo -e "${site_confs_wrong_ext}"
|
||||
fi
|
||||
# if [ -n "${site_confs_wrong_ext}" ]; then
|
||||
# echo "**** The following site-confs have extensions other than .conf ****"
|
||||
# echo "**** This may be due to user customization. ****"
|
||||
# echo "**** You should review the files and rename them to use the .conf extension or remove them. ****"
|
||||
# echo "**** nginx.conf will only include site-confs with the .conf extension. ****"
|
||||
# echo -e "${site_confs_wrong_ext}"
|
||||
# fi
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if pgrep -f "[n]ginx:" >/dev/null; then
|
||||
echo "Zombie nginx processes detected, sending SIGTERM"
|
||||
pkill -ef [n]ginx:
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
if pgrep -f "[n]ginx:" >/dev/null; then
|
||||
echo "Zombie nginx processes still active, sending SIGKILL"
|
||||
pkill -9 -ef [n]ginx:
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
# exec /usr/sbin/nginx
|
||||
@@ -1 +0,0 @@
|
||||
longrun
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ -f /usr/sbin/php-fpm83 ]]; then
|
||||
exec /usr/sbin/php-fpm83 -F
|
||||
fi
|
||||
@@ -1 +0,0 @@
|
||||
longrun
|
||||
3
root/etc/services.d/tvapp2/run
Executable file
3
root/etc/services.d/tvapp2/run
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
cd "/usr/src/app"
|
||||
npm start
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
migrate() {
|
||||
local OLD_LOCATION="${1}"
|
||||
local NEW_LOCATION="${2}"
|
||||
|
||||
if [[ -f ${OLD_LOCATION} ]]; then
|
||||
echo "found ${OLD_LOCATION}"
|
||||
if [[ ! -f ${NEW_LOCATION} ]]; then
|
||||
echo "moving to ${NEW_LOCATION}"
|
||||
mv "${OLD_LOCATION}" "${NEW_LOCATION}"
|
||||
else
|
||||
echo "new file location already exists ${NEW_LOCATION}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# rename default to default.conf
|
||||
# migrate "/config/nginx/site-confs/default" "/config/nginx/site-confs/default.conf"
|
||||
13
index.js → tvapp2/index.js
Normal file → Executable file
13
index.js → tvapp2/index.js
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const https = require('https');
|
||||
const path = require('path');
|
||||
@@ -12,10 +14,9 @@ const cache = new Map();
|
||||
let URLS_FILE;
|
||||
let FORMATTED_FILE;
|
||||
let EPG_FILE;
|
||||
const xmltv_epg = 'https://git.binaryninja.net/BinaryNinja/XMLTV-EPG/raw/branch/main/xmltv.1.xml';
|
||||
const externalURL = 'https://git.binaryninja.net/BinaryNinja/tvapp2-externals/raw/branch/main/urls.txt';
|
||||
const externalEPG = 'https://git.binaryninja.net/BinaryNinja/XMLTV-EPG/raw/branch/main/xmltv.1.xml';
|
||||
const externalFORMATTED_1 = 'https://git.binaryninja.net/BinaryNinja/tvapp2-externals/raw/branch/main/formatted.dat';
|
||||
const externalURL = `${process.env.URL_REPO}/tvapp2-externals/raw/branch/main/urls.txt`;
|
||||
const externalEPG = `${process.env.URL_REPO}//XMLTV-EPG/raw/branch/main/xmltv.1.xml`;
|
||||
const externalFORMATTED_1 = `${process.env.URL_REPO}/tvapp2-externals/raw/branch/main/formatted.dat`;
|
||||
const externalFORMATTED_2 = '';
|
||||
const externalFORMATTED_3 = '';
|
||||
const externalEvents = '';
|
||||
@@ -651,8 +652,8 @@ const server = http.createServer((req, res) => {
|
||||
|
||||
(async () => {
|
||||
await initialize();
|
||||
const PORT = 4124;
|
||||
server.listen(PORT, '0.0.0.0', () => {
|
||||
const PORT = process.env.WEB_PORT;
|
||||
server.listen(PORT, `${process.env.WEB_IP}`, () => {
|
||||
log(`Server is running on port ${PORT}`);
|
||||
});
|
||||
})();
|
||||
0
node_modules/.bin/playwright → tvapp2/node_modules/.bin/playwright
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright → tvapp2/node_modules/.bin/playwright
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright-core → tvapp2/node_modules/.bin/playwright-core
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright-core → tvapp2/node_modules/.bin/playwright-core
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright-core.cmd → tvapp2/node_modules/.bin/playwright-core.cmd
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright-core.cmd → tvapp2/node_modules/.bin/playwright-core.cmd
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright-core.ps1 → tvapp2/node_modules/.bin/playwright-core.ps1
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright-core.ps1 → tvapp2/node_modules/.bin/playwright-core.ps1
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright.cmd → tvapp2/node_modules/.bin/playwright.cmd
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright.cmd → tvapp2/node_modules/.bin/playwright.cmd
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright.ps1 → tvapp2/node_modules/.bin/playwright.ps1
generated
vendored
Normal file → Executable file
0
node_modules/.bin/playwright.ps1 → tvapp2/node_modules/.bin/playwright.ps1
generated
vendored
Normal file → Executable file
0
node_modules/.package-lock.json → tvapp2/node_modules/.package-lock.json
generated
vendored
Normal file → Executable file
0
node_modules/.package-lock.json → tvapp2/node_modules/.package-lock.json
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/LICENSE → tvapp2/node_modules/lodash.clonedeep/LICENSE
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/LICENSE → tvapp2/node_modules/lodash.clonedeep/LICENSE
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/README.md → tvapp2/node_modules/lodash.clonedeep/README.md
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/README.md → tvapp2/node_modules/lodash.clonedeep/README.md
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/index.js → tvapp2/node_modules/lodash.clonedeep/index.js
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/index.js → tvapp2/node_modules/lodash.clonedeep/index.js
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/package.json → tvapp2/node_modules/lodash.clonedeep/package.json
generated
vendored
Normal file → Executable file
0
node_modules/lodash.clonedeep/package.json → tvapp2/node_modules/lodash.clonedeep/package.json
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/LICENSE → tvapp2/node_modules/playwright-core/LICENSE
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/LICENSE → tvapp2/node_modules/playwright-core/LICENSE
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/NOTICE → tvapp2/node_modules/playwright-core/NOTICE
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/NOTICE → tvapp2/node_modules/playwright-core/NOTICE
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/README.md → tvapp2/node_modules/playwright-core/README.md
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/README.md → tvapp2/node_modules/playwright-core/README.md
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/install_media_pack.ps1 → tvapp2/node_modules/playwright-core/bin/install_media_pack.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/install_media_pack.ps1 → tvapp2/node_modules/playwright-core/bin/install_media_pack.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 → tvapp2/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/browsers.json → tvapp2/node_modules/playwright-core/browsers.json
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/browsers.json → tvapp2/node_modules/playwright-core/browsers.json
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/cli.js → tvapp2/node_modules/playwright-core/cli.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/cli.js → tvapp2/node_modules/playwright-core/cli.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/index.d.ts → tvapp2/node_modules/playwright-core/index.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/index.d.ts → tvapp2/node_modules/playwright-core/index.d.ts
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/index.js → tvapp2/node_modules/playwright-core/index.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/index.js → tvapp2/node_modules/playwright-core/index.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/index.mjs → tvapp2/node_modules/playwright-core/index.mjs
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/index.mjs → tvapp2/node_modules/playwright-core/index.mjs
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/androidServerImpl.js → tvapp2/node_modules/playwright-core/lib/androidServerImpl.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/androidServerImpl.js → tvapp2/node_modules/playwright-core/lib/androidServerImpl.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/browserServerImpl.js → tvapp2/node_modules/playwright-core/lib/browserServerImpl.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/browserServerImpl.js → tvapp2/node_modules/playwright-core/lib/browserServerImpl.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/cli/driver.js → tvapp2/node_modules/playwright-core/lib/cli/driver.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/cli/driver.js → tvapp2/node_modules/playwright-core/lib/cli/driver.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/cli/program.js → tvapp2/node_modules/playwright-core/lib/cli/program.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/cli/program.js → tvapp2/node_modules/playwright-core/lib/cli/program.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/cli/programWithTestStub.js → tvapp2/node_modules/playwright-core/lib/cli/programWithTestStub.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/cli/programWithTestStub.js → tvapp2/node_modules/playwright-core/lib/cli/programWithTestStub.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/client/accessibility.js → tvapp2/node_modules/playwright-core/lib/client/accessibility.js
generated
vendored
Normal file → Executable file
0
node_modules/playwright-core/lib/client/accessibility.js → tvapp2/node_modules/playwright-core/lib/client/accessibility.js
generated
vendored
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user