feat: split Z Ecosystem from OMNL/DBIS with separate builds and deploy

Add VITE_ECOSYSTEM build profiles, Z-only nginx vhosts, standalone Z production stack script, and remove Z Chain from OMNL registry.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
2026-07-07 05:17:40 -07:00
co-authored by Cursor
parent eaca1ee6ca
commit a2db92f3cb
27 changed files with 448 additions and 153 deletions
+7 -10
View File
@@ -12,8 +12,7 @@ const DIST = path.join(__dirname, '..', 'dist');
const PORT = Number(process.env.PORT || process.env.OMNL_BANK_FRONTEND_PORT || 3002);
const API_TARGET = process.env.TOKEN_AGGREGATION_URL || 'http://127.0.0.1:3000';
const SETTLEMENT_TARGET = process.env.SETTLEMENT_URL || process.env.SETTLEMENT_MIDDLEWARE_URL || 'http://127.0.0.1:3011';
const EXCHANGE_TARGET = process.env.EXCHANGE_URL || 'https://exchange.omdnl.org';
const EXCHANGE_TARGET = process.env.EXCHANGE_URL || '';
const MIME = {
'.html': 'text/html; charset=utf-8',
'.js': 'application/javascript; charset=utf-8',
@@ -103,17 +102,15 @@ const server = http.createServer((req, res) => {
);
}
if (url.startsWith('/exchange')) {
if (!EXCHANGE_TARGET) {
res.writeHead(404, { 'Content-Type': 'application/json' });
return res.end(JSON.stringify({ error: 'not_available', message: 'Z Ecosystem only' }));
}
return proxyRequest(req, res, EXCHANGE_TARGET);
}
if (url.startsWith('/omnl/')) {
if (shouldServeOmnlStatic(url)) {
const file = resolveStatic(url);
if (file) {
const cache = url.startsWith('/omnl/static/') ? 'public, max-age=31536000, immutable' : 'no-cache';
return sendFile(res, file, cache);
}
}
return proxyRequest(req, res, API_TARGET);
res.writeHead(404, { 'Content-Type': 'application/json' });
return res.end(JSON.stringify({ error: 'not_available', message: 'Z Ecosystem only' }));
}
const file = resolveStatic(url === '/' ? '/index.html' : url);