Run the token web server with deno

This commit is contained in:
tcely
2025-12-27 05:59:51 -05:00
committed by GitHub
parent d70a749278
commit faa5464075
18 changed files with 85 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
upstream token_server {
server 127.0.0.2:4416 down;
server 127.0.0.1:4406 max_fails=0;
}
server {

View File

@@ -0,0 +1,2 @@
base
tubesync-init

View File

@@ -0,0 +1,28 @@
#!/command/with-contenv bash
set -eu
cd /app/bgutil-ytdlp-pot-provider/server
command -v deno >/dev/null || \
/app/install_deno.sh
test '!' -d build || \
test '!' -f build/main.js || \
test '!' -d node_modules || \
exit 0 # nothing needs to be built
command -v node > /dev/null || \
install -v -t /usr/local/bin ../node
chown -R app:app .
s6-setuidgid app \
env DENO_COMPAT=1 deno run -A npm:npm ci --no-fund
s6-setuidgid app \
env DENO_COMPAT=1 deno run -A npm:npm audit fix
s6-setuidgid app \
../node typescript:/tsc
chown -R root:app .

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,3 @@
#!/command/execlineb -P
/etc/s6-overlay/s6-rc.d/bgutil-ytdlp-pot-provider-build/run

View File

@@ -0,0 +1,2 @@
base
bgutil-ytdlp-pot-provider-build

View File

@@ -0,0 +1,7 @@
#!/command/with-contenv bash
set -e
cd /app/bgutil-ytdlp-pot-provider
exec s6-setuidgid app \
./node server/build/main.js -p 4406

View File

@@ -0,0 +1 @@
longrun

View File

@@ -1 +1,2 @@
tubesync-init
base
tubesync-init

0
config/root/etc/s6-overlay/s6-rc.d/huey-database/run Normal file → Executable file
View File

0
config/root/etc/s6-overlay/s6-rc.d/huey-filesystem/run Normal file → Executable file
View File

View File

0
config/root/etc/s6-overlay/s6-rc.d/huey-network/run Normal file → Executable file
View File

View File

@@ -1 +1,2 @@
gunicorn
base
gunicorn

View File

@@ -0,0 +1 @@
base