NVIDIA
NVIDIA
rag-frontend
Container
NVIDIA
NVIDIA
rag-frontend

This is the sample frontend container used as part of the NVIDIA AI Blueprint for RAG.

LayerLabelCreated
sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4CMD
["node" "-e" "const http=require('http');const fs=require('fs');const path=require('path');const {URL}=require('url');const CHAT=process.env.VITE_API_CHAT_URL||'http://rag-server:8081/v1';const VDB=process.env.VITE_API_VDB_URL||'http://ingestor-server:8082/v1';const server=http.createServer((req,res)=>{if(req.url.startsWith('/api/generate')){const u=new URL(CHAT);const opt={hostname:u.hostname,port:u.port,path:req.url.replace('/api',''),method:req.method,headers:{...req.headers,host:u.host}};const pr=http.request(opt,r=>{res.writeHead(r.statusCode,r.headers);r.pipe(res)});pr.on('error',e=>{res.writeHead(500);res.end('Error:'+e.message)});req.pipe(pr)}else if(req.url.startsWith('/api/')){const u=new URL(VDB);const opt={hostname:u.hostname,port:u.port,path:req.url.replace('/api',''),method:req.method,headers:{...req.headers,host:u.host}};const pr=http.request(opt,r=>{res.writeHead(r.statusCode,r.headers);r.pipe(res)});pr.on('error',e=>{res.writeHead(500);res.end('Error:'+e.message)});req.pipe(pr)}else{let f=req.url==='/'?'/index.html':req.url;f=path.join('./dist',f);if(!fs.existsSync(f)&&!f.includes('.'))f=path.join('./dist','index.html');fs.readFile(f,(e,d)=>{if(e){res.writeHead(404);res.end('Not found')}else{res.writeHead(200,{'Content-Type':f.endsWith('.html')?'text/html':f.endsWith('.js')?'application/javascript':f.endsWith('.css')?'text/css':'text/plain'});res.end(d)}})}});server.listen(3000,'0.0.0.0',()=>console.log('Server running on port 3000'));"]
10/09/2025 6:30 AM UTC
sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4EXPOSE
3000/tcp
10/09/2025 6:30 AM UTC
sha256:e387cd529f027d2c72796ed0e6c7eb2f93193f32190c2aa831b97528861cf20dCOPY
/app/frontend/node_modules ./node_modules
10/09/2025 6:30 AM UTC
sha256:9dc38a4fa47c18d85078f543fac1aba561979d986fe091bb39e996cdc1a95cc9COPY
/app/frontend/vite.config.ts ./vite.config.ts
10/09/2025 6:30 AM UTC
sha256:1b86d5589cde2fe545e1ef687e63723da8c6cfe1db84b5a18d14138329c1b419COPY
/app/frontend/package.json ./package.json
10/09/2025 6:30 AM UTC
sha256:f42b3278cf1cc4e3be22660e154422cc7e651d69f729b7941026f5791efe5e61COPY
/app/frontend/dist ./dist
10/09/2025 6:30 AM UTC
sha256:ee2301cf8203cb01b315285757e657515c8b6ca33ed0b679c683b1b0a2dc6c2bCOPY
/legal/LICENSE-3rd-party.txt /legal/LICENSE-3rd-party.txt
10/09/2025 6:30 AM UTC
sha256:e4705bb638fee60b476fdc48e80dc34dfb5559f221b2f06e3e1963065a4aa8c2WORKDIR
/app/frontend
10/09/2025 6:28 AM UTC
sha256:ea3773dba9215eb23212d3b3e22bc8e523eb58baf5b9378a0af6dbdbdb93ea86CONFIG
01/01/0001 12:00 AM UTC
sha256:00178db943e30e3c688e29745e5bccbae7143c30459912563e3528362b5aafbbCONFIG
01/01/0001 12:00 AM UTC