fix: change explorer port to 3001 and add systemd service configuration

This commit is contained in:
oib
2026-02-26 23:42:23 +01:00
parent dd5c7f0e22
commit c5af4819ff
2 changed files with 23 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ BLOCKCHAIN_RPC_URL = "http://localhost:8082" # Local blockchain node
EXTERNAL_RPC_URL = "http://aitbc.keisanki.net:8082" # External access
# HTML Template
HTML_TEMPLATE = """
HTML_TEMPLATE = r"""
<!DOCTYPE html>
<html lang="en">
<head>
@@ -458,4 +458,4 @@ async def health():
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=3000)
uvicorn.run(app, host="0.0.0.0", port=3001)

View File

@@ -0,0 +1,21 @@
[Unit]
Description=AITBC Blockchain Explorer UI
After=network.target aitbc-blockchain-rpc-1.service aitbc-blockchain-rpc-2.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/aitbc/apps/blockchain-explorer
# Assuming we will use the venv from coordinator-api or blockchain-node as standard
Environment=PATH=/opt/aitbc/apps/coordinator-api/.venv/bin:/usr/local/bin:/usr/bin:/bin
# Need to make sure fastapi and uvicorn are available
ExecStart=/opt/aitbc/apps/coordinator-api/.venv/bin/python main.py
Restart=always
RestartSec=5
# Adjust logging
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=aitbc-explorer
[Install]
WantedBy=multi-user.target