add multi-arch support, and decouple vanguards

This commit is contained in:
wander 2026-02-05 21:54:18 -05:00
parent 1dbcebdee3
commit b0a7d4aea1
6 changed files with 135 additions and 58 deletions

25
assets/entrypoint.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/sh
# Defaults
ENABLE_VANGUARDS=${ENABLE_VANGUARDS:-true}
ENABLE_TOR=${ENABLE_TOR:-true}
# If user specifically requests to disable Vanguards
if [ "$ENABLE_VANGUARDS" = "false" ]; then
echo "Disabling Vanguards service..."
sed -i '/- vanguards/d' /entrypoint-config.yml
fi
# If user specifically requests to disable Tor (e.g. for sidecar mode)
if [ "$ENABLE_TOR" = "false" ]; then
echo "Disabling Tor service..."
sed -i '/- tor/d' /entrypoint-config.yml
# In sidecar mode, we don't want to auto-resolve the control port using local defaults.
# We remove the line that sets TOR_CONTROL_PORT via 'onions --resolve-control-port'
# so that the environment variable passed to the container is preserved.
sed -i '/TOR_CONTROL_PORT: onions --resolve-control-port/d' /entrypoint-config.yml
fi
# Pass control to pyentrypoint
exec pyentrypoint "$@"