Overview
The Xyne Portable Deployment system provides a one-click deployment solution that can be easily transferred and deployed on any system. This advanced deployment method separates infrastructure and application components for efficient updates and maintenance.This deployment method is ideal for production environments, development teams, and situations where you need to frequently update the application without affecting the database or search infrastructure.
Software Requirements
Minimum System Requirements
- OS: Linux (Ubuntu 20.04+ recommended), macOS, or Windows with WSL2
- RAM: 8GB minimum, 16GB+ recommended
- Storage: 50GB+ available disk space
- CPU: 4+ cores recommended
Required Software
Docker Engine
Version: 20.10+Installation: Docker Official GuideEnsure Docker daemon is running and accessible without sudo (add user to docker group)
Docker Compose
Version: 2.0+Installation: Usually included with Docker Desktop or install separately via Compose docsVerify with:
docker-compose --versionGPU Support (Optional)
For optimal search performance with GPU-accelerated embeddings:NVIDIA Container Toolkit
Required for: GPU-accelerated Vespa search engineInstallation:Verify:
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smiQuick Start
Method 1: Import Pre-built Package
If you received a pre-built Xyne package:1
Extract Package
2
Import Docker Images
- Load the main Xyne application image
- Load the GPU-enabled Vespa image
- Pull supporting images (PostgreSQL, Prometheus, Grafana, etc.)
3
Configure Environment
4
Deploy
5
Access Application
Navigate to
http://localhost:3000 to access XyneAdditional Services:- Grafana Dashboard:
http://localhost:3002 - Prometheus Metrics:
http://localhost:9090 - Loki Logs:
http://localhost:3100
Method 2: Build from Source
If deploying directly from the Xyne repository:1
Clone Repository
2
Build and Export
3
Deploy
Deployment Architecture
The portable deployment uses a modular architecture with separated concerns:Split Compose Structure
- Fast app updates: Update application without touching database/search
- Selective control: Manage infrastructure and application independently
- Zero-downtime: Infrastructure remains running during app updates
Service Components
Infrastructure Services
Always-On Components:
- PostgreSQL Database
- Vespa Search Engine (GPU-enabled)
- Prometheus (Metrics)
- Grafana (Dashboards)
- Loki + Promtail (Logging)
Application Service
Frequently Updated:
- Xyne Node.js Application
- Frontend React Build
- API Endpoints
- Business Logic
Deployment Commands
Thedeploy.sh script provides comprehensive deployment management:
Basic Operations
Efficient Updates
Database Management
Monitoring & Debugging
Environment Configuration
Essential Environment Variables
Create or modify the.env file in your deployment directory:
Advanced Configuration
Vespa Search Configuration
Vespa Search Configuration
Monitoring & Logging
Monitoring & Logging
Data Persistence
All application data is stored in the./data/ directory:
Data Directory Structure
- Regular backup of
postgres-data/for database - Backup
app-migrations/for schema history - Backup
vespa-data/for search indices (can be rebuilt) - Include
app-uploads/for user content
- Drizzle migrations are stored in
app-migrations/and persist across updates - Generated migrations remain available after container rebuilds
- Schema changes are tracked and versioned automatically
Performance Tuning
Resource Allocation
Memory Optimization
Small Deployment (8GB RAM):Large Deployment (32GB+ RAM):
Storage Optimization
SSD Recommended for:
- PostgreSQL data (
postgres-data/) - Vespa indices (
vespa-data/)
- Logs (
*-logs/,loki-data/) - Backups and archives
Network Configuration
Custom Port Configuration
Custom Port Configuration
Troubleshooting
Common Issues
Permission Denied Errors
Permission Denied Errors
Symptoms: Container startup failures, file permission errorsSolution:
GPU Not Detected
GPU Not Detected
Symptoms: Vespa falls back to CPU-only modeDiagnosis:Solution: Install NVIDIA Container Toolkit (see requirements section)
Application Won't Start
Application Won't Start
Symptoms: App container keeps restartingDiagnosis:Common Fixes:
- Ensure database is healthy before app starts
- Verify environment variables in
.env - Check available disk space and memory
Out of Disk Space
Out of Disk Space
Symptoms: Services stop, write errors in logsSolution:
Health Checks
Monitor system health using built-in endpoints:Migration Guide
From Simple Docker Compose
If migrating from the basic quickstart deployment:1
Backup Current Data
2
Deploy Portable System
3
Migrate Data
To Production Environment
Always test the portable deployment in a staging environment before production use.
1
Production Environment Setup
- Ensure adequate resources (see requirements)
- Configure firewall for required ports
- Set up SSL/TLS termination (reverse proxy)
- Configure backup procedures
2
Security Hardening
- Change default passwords in
.env - Restrict network access to management ports
- Configure log rotation and monitoring
- Set up automated security updates
3
Monitoring Setup
- Configure Grafana alerts
- Set up log aggregation
- Monitor disk space and performance
- Test backup and recovery procedures