fix: change explorer port to 3001 and add systemd service configuration
This commit is contained in:
@@ -21,7 +21,7 @@ BLOCKCHAIN_RPC_URL = "http://localhost:8082" # Local blockchain node
|
|||||||
EXTERNAL_RPC_URL = "http://aitbc.keisanki.net:8082" # External access
|
EXTERNAL_RPC_URL = "http://aitbc.keisanki.net:8082" # External access
|
||||||
|
|
||||||
# HTML Template
|
# HTML Template
|
||||||
HTML_TEMPLATE = """
|
HTML_TEMPLATE = r"""
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@@ -458,4 +458,4 @@ async def health():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
uvicorn.run(app, host="0.0.0.0", port=3000)
|
uvicorn.run(app, host="0.0.0.0", port=3001)
|
||||||
|
|||||||
21
systemd/aitbc-explorer.service
Normal file
21
systemd/aitbc-explorer.service
Normal 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
|
||||||
Reference in New Issue
Block a user