FROM node:20-slim LABEL maintainer="Debai Team " LABEL description="Debai Web GUI" # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-pip \ curl \ && rm -rf /var/lib/apt/lists/* # Create app user RUN useradd -m -s /bin/bash debai WORKDIR /app # Copy Python backend COPY --chown=debai:debai pyproject.toml README.md ./ COPY --chown=debai:debai src/ ./src/ # Install Python dependencies RUN pip3 install --no-cache-dir --break-system-packages -e . # Create web GUI directory RUN mkdir -p /app/web && chown -R debai:debai /app/web # Simple web server for GUI COPY --chown=debai:debai <<'EOF' /app/web/server.js const http = require('http'); const fs = require('fs'); const path = require('path'); const PORT = 8080; const server = http.createServer((req, res) => { if (req.url === '/' || req.url === '/index.html') { res.writeHead(200, { 'Content-Type': 'text/html' }); res.end(` Debai - AI Agent Management

🤖 Debai

AI Agent Management System

System Status

API Status: Checking...
Models Service: Checking...
Version: 1.0.0
â„šī¸ Note: This is a placeholder web interface. Use the GTK GUI application for full functionality or access the API directly.
📚 API Docs 📊 Metrics 📈 Grafana

For full GUI functionality, install the GTK application:
debai-gui

`); } else if (req.url === '/health') { res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ status: 'ok' })); } else { res.writeHead(404); res.end('Not Found'); } }); server.listen(PORT, '0.0.0.0', () => { console.log(\`Web GUI running on http://0.0.0.0:\${PORT}\`); }); EOF USER debai EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ CMD curl -f http://localhost:8080/health || exit 1 CMD ["node", "/app/web/server.js"]