aboutsummaryrefslogtreecommitdiffstats
path: root/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'entrypoint.sh')
-rw-r--r--entrypoint.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100644
index 0000000..a63a188
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -eu
+
+echo "[entrypoint] Starting yt-local..."
+
+# Optionally start Tor in the background as the tor user
+if [ "${ENABLE_TOR:-0}" = "1" ]; then
+ echo "[entrypoint] Launching Tor daemon..."
+ su-exec tor /entrypoint-tor.sh &
+ sleep 3
+fi
+
+# Drop to appuser. Bind to all interfaces — container networking
+# requires 0.0.0.0; actual access is controlled by Docker (-p flag).
+exec su-exec appuser python server.py --bind 0.0.0.0