fix(https): move Flask backend to 8443 to avoid netns conflict with http service on 8080

This commit is contained in:
2026-05-10 02:31:08 -04:00
parent 44ab42d80c
commit 8d1f26c0c7
2 changed files with 4 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ cat > /etc/caddy/Caddyfile <<EOF
tls ${CERT} ${KEY} tls ${CERT} ${KEY}
route { route {
decnet_fp decnet_fp
reverse_proxy 127.0.0.1:8080 reverse_proxy 127.0.0.1:8443
} }
} }
EOF EOF
@@ -75,12 +75,12 @@ python3 -c "
import socket, sys, time import socket, sys, time
for _ in range(80): for _ in range(80):
try: try:
s = socket.create_connection(('127.0.0.1', 8080), timeout=0.25) s = socket.create_connection(('127.0.0.1', 8443), timeout=0.25)
s.close() s.close()
sys.exit(0) sys.exit(0)
except OSError: except OSError:
time.sleep(0.1) time.sleep(0.1)
print('Flask did not bind to :8080 in time', file=sys.stderr) print('Flask did not bind to :8443 in time', file=sys.stderr)
sys.exit(1) sys.exit(1)
" || { echo 'Flask startup failed — aborting'; kill $FLASK_PID 2>/dev/null; exit 1; } " || { echo 'Flask startup failed — aborting'; kill $FLASK_PID 2>/dev/null; exit 1; }

View File

@@ -32,7 +32,7 @@ logging.getLogger("werkzeug").setLevel(logging.ERROR)
NODE_NAME = os.environ.get("NODE_NAME", "webserver") NODE_NAME = os.environ.get("NODE_NAME", "webserver")
SERVICE_NAME = "https" SERVICE_NAME = "https"
LOG_TARGET = os.environ.get("LOG_TARGET", "") LOG_TARGET = os.environ.get("LOG_TARGET", "")
PORT = int(os.environ.get("PORT", "8080")) PORT = int(os.environ.get("PORT", "8443"))
_SERVER_CHOICES = [ _SERVER_CHOICES = [
"Apache/2.4.41 (Ubuntu)", "Apache/2.4.41 (Ubuntu)",