Dnomd343
2 years ago
6 changed files with 60 additions and 71 deletions
@ -1,12 +0,0 @@ |
|||||
get_github_latest_version() { |
|
||||
VERSION=$(curl --silent "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'); |
|
||||
} |
|
||||
|
|
||||
apk add curl wget |
|
||||
mkdir -p /tmp |
|
||||
get_github_latest_version "Rudloff/alltube" |
|
||||
wget https://github.com/Rudloff/alltube/releases/download/$VERSION/alltube-$VERSION.zip -O /tmp/alltube.zip |
|
||||
unzip -d /tmp/ /tmp/alltube.zip |
|
||||
wget https://install.phpcomposer.com/installer -O /tmp/alltube/composer-setup.php |
|
||||
mv /nginx.conf /tmp/alltube/ |
|
||||
mv /init.sh /tmp/alltube/ |
|
@ -1,6 +1,7 @@ |
|||||
|
#!/usr/bin/env sh |
||||
|
|
||||
if [ -n "$TITLE" ]; then |
if [ -n "$TITLE" ]; then |
||||
sed -i "/^appName:/cappName: $TITLE" /var/www/alltube/config/config.yml |
sed -i "/^appName:/cappName: $TITLE" /var/www/alltube/config/config.yml |
||||
fi |
fi |
||||
/usr/sbin/php-fpm7 |
|
||||
/usr/sbin/nginx |
/usr/sbin/nginx |
||||
read -n 1 |
exec /usr/sbin/php-fpm7 -F |
||||
|
@ -1,47 +0,0 @@ |
|||||
user nginx; |
|
||||
worker_processes auto; |
|
||||
pcre_jit on; |
|
||||
include /etc/nginx/modules/*.conf; |
|
||||
|
|
||||
events { |
|
||||
worker_connections 1024; |
|
||||
} |
|
||||
|
|
||||
http { |
|
||||
include /etc/nginx/mime.types; |
|
||||
server { |
|
||||
listen 80; |
|
||||
root /var/www/alltube; |
|
||||
index index.php; |
|
||||
|
|
||||
types { |
|
||||
text/html html htm shtml; |
|
||||
text/css css; |
|
||||
text/xml xml; |
|
||||
application/x-web-app-manifest+json webapp; |
|
||||
} |
|
||||
|
|
||||
location ~ /\. { |
|
||||
deny all; |
|
||||
} |
|
||||
|
|
||||
location / { |
|
||||
try_files $uri /index.php?$args; |
|
||||
} |
|
||||
|
|
||||
location ~ \.php$ { |
|
||||
include fastcgi_params; |
|
||||
fastcgi_pass 127.0.0.1:9000; |
|
||||
try_files $uri /index.php?$args; |
|
||||
fastcgi_buffers 4 16k; |
|
||||
fastcgi_buffer_size 16k; |
|
||||
fastcgi_index index.php; |
|
||||
fastcgi_intercept_errors off; |
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$; |
|
||||
fastcgi_param HTTPS 'ok'; |
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info; |
|
||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; |
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,35 @@ |
|||||
|
server { |
||||
|
listen 80; |
||||
|
root /var/www/alltube/; |
||||
|
index index.php; |
||||
|
|
||||
|
types { |
||||
|
text/html html htm shtml; |
||||
|
text/css css; |
||||
|
text/xml xml; |
||||
|
application/x-web-app-manifest+json webapp; |
||||
|
} |
||||
|
|
||||
|
location ~ /\. { |
||||
|
deny all; |
||||
|
} |
||||
|
|
||||
|
location / { |
||||
|
try_files $uri /index.php?$args; |
||||
|
} |
||||
|
|
||||
|
location ~ \.php$ { |
||||
|
include fastcgi_params; |
||||
|
fastcgi_pass 127.0.0.1:9000; |
||||
|
try_files $uri /index.php?$args; |
||||
|
fastcgi_buffers 4 16k; |
||||
|
fastcgi_buffer_size 16k; |
||||
|
fastcgi_index index.php; |
||||
|
fastcgi_intercept_errors off; |
||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$; |
||||
|
fastcgi_param HTTPS 'ok'; |
||||
|
fastcgi_param PATH_INFO $fastcgi_path_info; |
||||
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; |
||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
user root; |
||||
|
pcre_jit on; |
||||
|
worker_processes auto; |
||||
|
error_log /dev/stdout warn; |
||||
|
|
||||
|
events { |
||||
|
worker_connections 1024; |
||||
|
} |
||||
|
|
||||
|
http { |
||||
|
log_format access '[$time_iso8601] $remote_addr -> $scheme://$host - "$request"' |
||||
|
' -> ($status) ↑$request_length ↓$bytes_sent {$http_user_agent}'; |
||||
|
access_log /dev/stdout access; |
||||
|
include /etc/nginx/mime.types; |
||||
|
include /etc/nginx/alltube.conf; |
||||
|
} |
Loading…
Reference in new issue