diff --git a/systemd/aitbc-blockchain-node.service b/systemd/aitbc-blockchain-node.service index 55a6f4a2..0b8b8522 100644 --- a/systemd/aitbc-blockchain-node.service +++ b/systemd/aitbc-blockchain-node.service @@ -10,8 +10,9 @@ Group=root WorkingDirectory=/opt/aitbc Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc -Environment=PYTHONPATH=/opt/aitbc/services +Environment=PYTHONPATH=/opt/aitbc/apps/blockchain-node/src EnvironmentFile=/etc/aitbc/production.env +Environment=AITBC_ENV=production # Production execution ExecStart=/opt/aitbc/venv/bin/python -m aitbc_chain.combined_main diff --git a/systemd/aitbc-blockchain-node.service.d/10-central-env.conf b/systemd/aitbc-blockchain-node.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-blockchain-node.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-blockchain-node.service.d/production.conf b/systemd/aitbc-blockchain-node.service.d/production.conf deleted file mode 100644 index 914ddb94..00000000 --- a/systemd/aitbc-blockchain-node.service.d/production.conf +++ /dev/null @@ -1,6 +0,0 @@ -[Service] -Restart=always -RestartSec=10 -LimitNOFILE=65536 -Environment="PYTHONPATH=/opt/aitbc/apps/blockchain-node/src" -Environment="AITBC_ENV=production" diff --git a/systemd/aitbc-blockchain-p2p.service b/systemd/aitbc-blockchain-p2p.service index 0c112a4d..4e07bd36 100644 --- a/systemd/aitbc-blockchain-p2p.service +++ b/systemd/aitbc-blockchain-p2p.service @@ -10,6 +10,7 @@ WorkingDirectory=/opt/aitbc/apps/blockchain-node Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=PYTHONPATH=/opt/aitbc/apps/blockchain-node/src:/opt/aitbc/apps/blockchain-node/scripts EnvironmentFile=/etc/aitbc/blockchain.env +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python -m aitbc_chain.p2p_network --host ${p2p_bind_host} --port ${p2p_bind_port} --peers ${p2p_peers} --node-id ${p2p_node_id} Restart=always RestartSec=5 diff --git a/systemd/aitbc-blockchain-p2p.service.d/10-central-env.conf b/systemd/aitbc-blockchain-p2p.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-blockchain-p2p.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-blockchain-rpc.service b/systemd/aitbc-blockchain-rpc.service index 31a687d9..c965d09a 100644 --- a/systemd/aitbc-blockchain-rpc.service +++ b/systemd/aitbc-blockchain-rpc.service @@ -8,6 +8,7 @@ User=root Group=root WorkingDirectory=/opt/aitbc/apps/blockchain-node EnvironmentFile=/etc/aitbc/blockchain.env +EnvironmentFile=/etc/aitbc/.env Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=PYTHONPATH=/opt/aitbc/apps/blockchain-node/src:/opt/aitbc/apps/blockchain-node/scripts ExecStart=/opt/aitbc/venv/bin/python -m uvicorn aitbc_chain.app:app --host ${rpc_bind_host} --port ${rpc_bind_port} diff --git a/systemd/aitbc-blockchain-rpc.service.d/10-central-env.conf b/systemd/aitbc-blockchain-rpc.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-blockchain-rpc.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-blockchain-sync.service b/systemd/aitbc-blockchain-sync.service index eeba594c..77a7a9be 100644 --- a/systemd/aitbc-blockchain-sync.service +++ b/systemd/aitbc-blockchain-sync.service @@ -8,6 +8,7 @@ User=root Group=root WorkingDirectory=/opt/aitbc/apps/blockchain-node EnvironmentFile=/etc/aitbc/blockchain.env +EnvironmentFile=/etc/aitbc/.env Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=PYTHONPATH=/opt/aitbc/apps/blockchain-node/src:/opt/aitbc/apps/blockchain-node/scripts ExecStart=/opt/aitbc/venv/bin/python -m aitbc_chain.chain_sync --redis redis://localhost:6379 --node-id ait18yefwwclgmyu2a74zvv0hj3a3xw6gxsn4akrj963kp069j9xy5ns3kurun --rpc-port 8006 --leader-host 10.1.223.40 --source-host 10.1.223.40 --source-port 8006 --import-host 10.1.223.40 --import-port 8006 diff --git a/systemd/aitbc-blockchain-sync.service.d/10-central-env.conf b/systemd/aitbc-blockchain-sync.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-blockchain-sync.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-coordinator-api.service b/systemd/aitbc-coordinator-api.service index 86eeb21c..9425b570 100644 --- a/systemd/aitbc-coordinator-api.service +++ b/systemd/aitbc-coordinator-api.service @@ -8,6 +8,7 @@ User=root WorkingDirectory=/opt/aitbc/apps/coordinator-api/src Environment=PYTHONPATH=/opt/aitbc/apps/coordinator-api/src:/opt/aitbc/packages/py/aitbc-sdk/src:/opt/aitbc/packages/py/aitbc-crypto/src Environment=COORDINATOR_API_KEY=admin_prod_key_use_real_value +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 Restart=always RestartSec=5 diff --git a/systemd/aitbc-coordinator-api.service.d/10-central-env.conf b/systemd/aitbc-coordinator-api.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-coordinator-api.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-cross-chain-reputation.service.d/10-central-env.conf b/systemd/aitbc-cross-chain-reputation.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-cross-chain-reputation.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-edge-monitoring-aitbc1-edge-secondary.service.d/10-central-env.conf b/systemd/aitbc-edge-monitoring-aitbc1-edge-secondary.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-edge-monitoring-aitbc1-edge-secondary.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-exchange-api.service b/systemd/aitbc-exchange-api.service index 2e378663..536e7dcc 100644 --- a/systemd/aitbc-exchange-api.service +++ b/systemd/aitbc-exchange-api.service @@ -8,7 +8,8 @@ Type=simple User=root Group=root WorkingDirectory=/opt/aitbc/apps/exchange -ExecStart=/opt/aitbc/venv/bin/python simple_exchange_api.py +EnvironmentFile=/etc/aitbc/.env +ExecStart=/opt/aitbc/apps/coordinator-api/.venv/bin/python simple_exchange_api.py --port 8001 ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=5 diff --git a/systemd/aitbc-exchange-api.service.d/10-central-env.conf b/systemd/aitbc-exchange-api.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-exchange-api.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-exchange-api.service.d/override.conf b/systemd/aitbc-exchange-api.service.d/override.conf deleted file mode 100644 index 7671efde..00000000 --- a/systemd/aitbc-exchange-api.service.d/override.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -ExecStart= -ExecStart=/opt/aitbc/apps/coordinator-api/.venv/bin/python simple_exchange_api.py --port 8001 diff --git a/systemd/aitbc-explorer.service b/systemd/aitbc-explorer.service index ae228eb0..0da304c5 100644 --- a/systemd/aitbc-explorer.service +++ b/systemd/aitbc-explorer.service @@ -8,6 +8,7 @@ User=root WorkingDirectory=/opt/aitbc/apps/blockchain-explorer # Using the blockchain node venv since the coordinator one is broken Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python main.py Restart=always RestartSec=5 diff --git a/systemd/aitbc-explorer.service.d/10-central-env.conf b/systemd/aitbc-explorer.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-explorer.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-learning.service b/systemd/aitbc-learning.service index e9819a6e..4fed7f8e 100644 --- a/systemd/aitbc-learning.service +++ b/systemd/aitbc-learning.service @@ -9,6 +9,7 @@ User=root Group=root WorkingDirectory=/opt/aitbc/apps/coordinator-api/ Environment=PYTHONPATH=/opt/aitbc/apps/coordinator-api/src:/opt/aitbc/packages/py/aitbc-sdk/src:/opt/aitbc/packages/py/aitbc-crypto/src +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python -m uvicorn app.services.adaptive_learning_app:app --host 127.0.0.1 --port 8011 ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed diff --git a/systemd/aitbc-learning.service.d/10-central-env.conf b/systemd/aitbc-learning.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-learning.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-marketplace.service b/systemd/aitbc-marketplace.service index 2590ba36..8493bef6 100644 --- a/systemd/aitbc-marketplace.service +++ b/systemd/aitbc-marketplace.service @@ -14,6 +14,7 @@ Environment=MARKETPLACE_PORT=8007 Environment=WORKERS=1 Environment=PYTHONPATH=/opt/aitbc/services EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Production execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/marketplace.py diff --git a/systemd/aitbc-marketplace.service.d/10-central-env.conf b/systemd/aitbc-marketplace.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-marketplace.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-miner-dashboard.service.d/10-central-env.conf b/systemd/aitbc-miner-dashboard.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-miner-dashboard.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-modality-optimization.service b/systemd/aitbc-modality-optimization.service index a82dd2d8..56dcaf73 100644 --- a/systemd/aitbc-modality-optimization.service +++ b/systemd/aitbc-modality-optimization.service @@ -10,6 +10,7 @@ Group=debian WorkingDirectory=/opt/aitbc/apps/coordinator-api Environment=PATH=/opt/aitbc/venv/bin:/usr/bin Environment=PYTHONPATH=/opt/aitbc/apps/coordinator-api/src +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python -m uvicorn src.app.services.modality_optimization_app:app --host 127.0.0.1 --port 8021 ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed diff --git a/systemd/aitbc-modality-optimization.service.d/10-central-env.conf b/systemd/aitbc-modality-optimization.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-modality-optimization.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-multimodal.service b/systemd/aitbc-multimodal.service index c0b51820..ddedae14 100644 --- a/systemd/aitbc-multimodal.service +++ b/systemd/aitbc-multimodal.service @@ -10,6 +10,7 @@ Group=debian WorkingDirectory=/opt/aitbc/apps/coordinator-api Environment=PATH=/opt/aitbc/venv/bin:/usr/bin Environment=PYTHONPATH=/opt/aitbc/apps/coordinator-api/src +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python -m uvicorn src.app.services.multimodal_app:app --host 127.0.0.1 --port 8020 ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed diff --git a/systemd/aitbc-multimodal.service.d/10-central-env.conf b/systemd/aitbc-multimodal.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-multimodal.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-node.service.d/10-central-env.conf b/systemd/aitbc-node.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-node.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-openclaw.service b/systemd/aitbc-openclaw.service index f2b5ac17..9456173b 100644 --- a/systemd/aitbc-openclaw.service +++ b/systemd/aitbc-openclaw.service @@ -10,6 +10,7 @@ Group=debian WorkingDirectory=/opt/aitbc/apps/coordinator-api Environment=PATH=/opt/aitbc/venv/bin:/usr/bin Environment=PYTHONPATH=/opt/aitbc/apps/coordinator-api/src +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python -m uvicorn src.app.routers.openclaw_enhanced_app:app --host 127.0.0.1 --port 8014 ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed diff --git a/systemd/aitbc-openclaw.service.d/10-central-env.conf b/systemd/aitbc-openclaw.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-openclaw.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env diff --git a/systemd/aitbc-wallet.service b/systemd/aitbc-wallet.service index 22f1847d..cb35dc37 100644 --- a/systemd/aitbc-wallet.service +++ b/systemd/aitbc-wallet.service @@ -10,6 +10,7 @@ Group=root WorkingDirectory=/opt/aitbc/apps/wallet Environment=PYTHONPATH=/opt/aitbc/apps/wallet/src:/opt/aitbc/packages/py/aitbc-crypto/src:/opt/aitbc/packages/py/aitbc-sdk/src Environment=COORDINATOR_API_KEY=test-key +EnvironmentFile=/etc/aitbc/.env ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/apps/wallet/simple_daemon.py KillMode=mixed TimeoutStopSec=5 diff --git a/systemd/aitbc-wallet.service.d/10-central-env.conf b/systemd/aitbc-wallet.service.d/10-central-env.conf deleted file mode 100644 index 423156db..00000000 --- a/systemd/aitbc-wallet.service.d/10-central-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -EnvironmentFile=/etc/aitbc/.env