aboutsummaryrefslogtreecommitdiffstats
path: root/entrypoint.sh
blob: a63a188ac3e27099c25c6d57e4d85b0f4188ec78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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