Split gateway control and dataplane into separate services
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 13s
Build and Deploy Gateway / deploy (push) Successful in 12s

This commit is contained in:
2026-07-11 17:52:48 +03:00
parent 4b326c5e99
commit b0b9da51b6
15 changed files with 479 additions and 117 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
APP_COMPONENT="${APP_COMPONENT:-combined}"
TPROXY_PORT="${TPROXY_PORT:-7895}"
TPROXY_MARK="${TPROXY_MARK:-1}"
TPROXY_TABLE="${TPROXY_TABLE:-100}"
@@ -19,6 +20,10 @@ log() {
printf '[gateway-entrypoint] %s\n' "$*"
}
if [[ "$APP_COMPONENT" == "control" ]]; then
exec node /app/src/server/index.js
fi
ipt() {
iptables -w "$@"
}
@@ -110,7 +115,11 @@ setup_gateway_forwarding
setup_tproxy
setup_proxy_firewall
node /app/src/server/index.js &
if [[ "$APP_COMPONENT" == "dataplane" ]]; then
node /app/src/server/dataplane.js &
else
node /app/src/server/index.js &
fi
APP_PID=$!
shutdown() {