Deployment¶
This guide covers how to deploy Nevron to your own server using Docker Compose. This is the recommended method for running Nevron in a production environment.
Server Deployment with Docker Compose¶
Deploying Nevron to your server is straightforward with our Docker Compose setup. This approach allows you to run the entire application stack with minimal configuration.
Official Docker Image¶
Nevron is available as an official Docker image on Docker Hub:
You can also build the image locally if needed:
Deployment Steps¶
1. Create Required Volumes¶
First, create the necessary volume directories based on your configuration:
# Create base directories
mkdir -p volumes/nevron/logs
# For ChromaDB (if using ChromaDB as vector store)
mkdir -p volumes/nevron/chromadb
# For Qdrant (if using Qdrant as vector store)
mkdir -p volumes/qdrant/data
mkdir -p volumes/qdrant/snapshots
# For Ollama (if using local LLM)
mkdir -p volumes/ollama/models
Note: You only need to create volumes for the services you plan to use. For example, if you're using ChromaDB, you don't need the Qdrant volumes.
2. Configure Services in docker-compose.yml¶
Edit your docker-compose.yml
file to enable or disable services based on your needs. You can disable a service by adding deploy: { replicas: 0 }
to its configuration:
# Example: Disable Qdrant if using ChromaDB
qdrant:
<<: *service_default
image: qdrant/qdrant:latest
deploy:
replicas: 0 # This disables the Qdrant service
# ... other configuration ...
# Example: Disable Ollama if using a third-party LLM
ollama:
<<: *service_default
image: ollama/ollama:latest
deploy:
replicas: 0 # This disables the Ollama service
# ... other configuration ...
3. Configure Environment Variables¶
Create and configure your .env
file:
Edit the .env
file to configure:
-
Vector Store: Choose between ChromaDB or Qdrant
-
LLM Provider: Choose between local Ollama or a third-party LLM
For a complete list of configuration options, refer to the Configuration documentation.
4. Start the Services¶
Launch the Nevron stack:
5. Monitor Logs¶
View the logs to ensure everything is running correctly:
6. Stop Services (When Needed)¶
To stop all services:
Configuration Details¶
Our Docker Compose setup includes:
- Service Definitions
- Automatic restart policies
- Proper logging configuration
-
Network isolation for security
-
Volume Management
- Persistent storage for logs and data
-
Configurable volume base directory
-
Networking
- Internal network for service communication
-
External network for API access
-
Environment Configuration
- Environment file support
- Override capability for all settings
Production Considerations¶
When deploying to production, consider the following:
- Security
- Use secure storage for API keys and sensitive data
- Consider using Docker secrets for sensitive information
-
Implement proper network security rules
-
Performance
- Configure appropriate resource limits for containers
- Monitor resource usage and adjust as needed
-
Consider using a dedicated server for high-traffic deployments
-
Reliability
- Set up health checks and automatic restarts
- Implement proper backup strategies for memory backends
-
Use a production-grade process manager
-
Monitoring
- Set up proper logging and monitoring
- Implement alerting for critical issues
-
Regularly check logs for errors or warnings
-
Scaling
- For high-load scenarios, consider scaling the vector database separately
- Use a load balancer if deploying multiple Nevron instances
For optimal production deployments, we recommend:
- Setting ENVIRONMENT=production
in your configuration
- Regular backups of memory storage
- Using a reverse proxy (like Nginx or Traefik) for any exposed endpoints
- Implementing proper monitoring and alerting