Docker deployment
There are two different Docker Compose files. They deploy the same applications and containers, but to different environments.
-
docker-compose.ymlis an OpenRAG deployment with GPU support for accelerated AI processing. -
docker-compose-cpu.ymlis a CPU-only version of OpenRAG for systems without GPU support. Use this Docker compose file for environments where GPU drivers aren't available.
To install OpenRAG with Docker Compose:
-
Clone the OpenRAG repository.
git clone https://github.com/langflow-ai/openrag.git
cd openrag -
Copy the example
.envfile that is included in the repository root. The example file includes all environment variables with comments to guide you in finding and setting their values.cp .env.example .envAlternatively, create a new
.envfile in the repository root.touch .env -
Set environment variables. The Docker Compose files are populated with values from your
.env, so the following values are required to be set:OPENSEARCH_PASSWORD=your_secure_password
OPENAI_API_KEY=your_openai_api_key
LANGFLOW_SUPERUSER=admin
LANGFLOW_SUPERUSER_PASSWORD=your_langflow_password
LANGFLOW_SECRET_KEY=your_secret_keyFor more information on configuring OpenRAG with environment variables, see Environment variables. For additional configuration values, including
config.yaml, see Configuration. -
Deploy OpenRAG with Docker Compose based on your deployment type.
For GPU-enabled systems, run the following command:
docker compose up -dFor CPU-only systems, run the following command:
docker compose -f docker-compose-cpu.yml up -dThe OpenRAG Docker Compose file starts five containers:
Container Name Default Address Purpose OpenRAG Backend http://localhost:8000 FastAPI server and core functionality. OpenRAG Frontend http://localhost:3000 React web interface for users. Langflow http://localhost:7860 AI workflow engine and flow management. OpenSearch http://localhost:9200 Vector database for document storage. OpenSearch Dashboards http://localhost:5601 Database administration interface. -
Verify installation by confirming all services are running.
docker compose psYou can now access the application at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Langflow: http://localhost:7860
Continue with the Quickstart.
Rebuild all Docker containers
If you need to reset state and rebuild all of your containers, run the following command.
Your OpenSearch and Langflow databases will be lost.
Documents stored in the ./documents directory will persist, since the directory is mounted as a volume in the OpenRAG backend container.
docker compose up --build --force-recreate --remove-orphans