makefile improvements for dev mode
This commit is contained in:
parent
534c3021dd
commit
f00ee39031
1 changed files with 19 additions and 16 deletions
35
Makefile
35
Makefile
|
|
@ -53,9 +53,12 @@ help:
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
# Development environments
|
# Development environments
|
||||||
|
# Use centralized env file from TUI if it exists, otherwise fall back to local .env
|
||||||
|
OPENRAG_ENV_FILE := $(shell if [ -f ~/.openrag/tui/.env ]; then echo "--env-file ~/.openrag/tui/.env"; fi)
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
@echo "🚀 Starting OpenRAG with GPU support..."
|
@echo "🚀 Starting OpenRAG with GPU support..."
|
||||||
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
|
docker compose $(OPENRAG_ENV_FILE) -f docker-compose.yml -f docker-compose.gpu.yml up -d
|
||||||
@echo "✅ Services started!"
|
@echo "✅ Services started!"
|
||||||
@echo " Backend: http://localhost:8000"
|
@echo " Backend: http://localhost:8000"
|
||||||
@echo " Frontend: http://localhost:3000"
|
@echo " Frontend: http://localhost:3000"
|
||||||
|
|
@ -65,7 +68,7 @@ dev:
|
||||||
|
|
||||||
dev-cpu:
|
dev-cpu:
|
||||||
@echo "🚀 Starting OpenRAG with CPU only..."
|
@echo "🚀 Starting OpenRAG with CPU only..."
|
||||||
docker compose up -d
|
docker compose $(OPENRAG_ENV_FILE) up -d
|
||||||
@echo "✅ Services started!"
|
@echo "✅ Services started!"
|
||||||
@echo " Backend: http://localhost:8000"
|
@echo " Backend: http://localhost:8000"
|
||||||
@echo " Frontend: http://localhost:3000"
|
@echo " Frontend: http://localhost:3000"
|
||||||
|
|
@ -75,7 +78,7 @@ dev-cpu:
|
||||||
|
|
||||||
dev-local:
|
dev-local:
|
||||||
@echo "🔧 Starting infrastructure only (for local development)..."
|
@echo "🔧 Starting infrastructure only (for local development)..."
|
||||||
docker compose up -d opensearch dashboards langflow
|
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
|
||||||
@echo "✅ Infrastructure started!"
|
@echo "✅ Infrastructure started!"
|
||||||
@echo " Langflow: http://localhost:7860"
|
@echo " Langflow: http://localhost:7860"
|
||||||
@echo " OpenSearch: http://localhost:9200"
|
@echo " OpenSearch: http://localhost:9200"
|
||||||
|
|
@ -85,7 +88,7 @@ dev-local:
|
||||||
|
|
||||||
infra:
|
infra:
|
||||||
@echo "🔧 Starting infrastructure services only..."
|
@echo "🔧 Starting infrastructure services only..."
|
||||||
docker compose up -d opensearch dashboards langflow
|
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
|
||||||
@echo "✅ Infrastructure services started!"
|
@echo "✅ Infrastructure services started!"
|
||||||
@echo " Langflow: http://localhost:7860"
|
@echo " Langflow: http://localhost:7860"
|
||||||
@echo " OpenSearch: http://localhost:9200"
|
@echo " OpenSearch: http://localhost:9200"
|
||||||
|
|
@ -93,7 +96,7 @@ infra:
|
||||||
|
|
||||||
infra-cpu:
|
infra-cpu:
|
||||||
@echo "🔧 Starting infrastructure services only..."
|
@echo "🔧 Starting infrastructure services only..."
|
||||||
docker compose up -d opensearch dashboards langflow
|
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
|
||||||
@echo "✅ Infrastructure services started!"
|
@echo "✅ Infrastructure services started!"
|
||||||
@echo " Langflow: http://localhost:7860"
|
@echo " Langflow: http://localhost:7860"
|
||||||
@echo " OpenSearch: http://localhost:9200"
|
@echo " OpenSearch: http://localhost:9200"
|
||||||
|
|
@ -102,13 +105,13 @@ infra-cpu:
|
||||||
# Container management
|
# Container management
|
||||||
stop:
|
stop:
|
||||||
@echo "🛑 Stopping all containers..."
|
@echo "🛑 Stopping all containers..."
|
||||||
docker compose down
|
docker compose $(OPENRAG_ENV_FILE) down
|
||||||
|
|
||||||
restart: stop dev
|
restart: stop dev
|
||||||
|
|
||||||
clean: stop
|
clean: stop
|
||||||
@echo "🧹 Cleaning up containers and volumes..."
|
@echo "🧹 Cleaning up containers and volumes..."
|
||||||
docker compose down -v --remove-orphans
|
docker compose $(OPENRAG_ENV_FILE) down -v --remove-orphans
|
||||||
docker system prune -f
|
docker system prune -f
|
||||||
|
|
||||||
# Local development
|
# Local development
|
||||||
|
|
@ -153,36 +156,36 @@ build-fe:
|
||||||
# Logging and debugging
|
# Logging and debugging
|
||||||
logs:
|
logs:
|
||||||
@echo "📋 Showing all container logs..."
|
@echo "📋 Showing all container logs..."
|
||||||
docker compose logs -f
|
docker compose $(OPENRAG_ENV_FILE) logs -f
|
||||||
|
|
||||||
logs-be:
|
logs-be:
|
||||||
@echo "📋 Showing backend logs..."
|
@echo "📋 Showing backend logs..."
|
||||||
docker compose logs -f openrag-backend
|
docker compose $(OPENRAG_ENV_FILE) logs -f openrag-backend
|
||||||
|
|
||||||
logs-fe:
|
logs-fe:
|
||||||
@echo "📋 Showing frontend logs..."
|
@echo "📋 Showing frontend logs..."
|
||||||
docker compose logs -f openrag-frontend
|
docker compose $(OPENRAG_ENV_FILE) logs -f openrag-frontend
|
||||||
|
|
||||||
logs-lf:
|
logs-lf:
|
||||||
@echo "📋 Showing langflow logs..."
|
@echo "📋 Showing langflow logs..."
|
||||||
docker compose logs -f langflow
|
docker compose $(OPENRAG_ENV_FILE) logs -f langflow
|
||||||
|
|
||||||
logs-os:
|
logs-os:
|
||||||
@echo "📋 Showing opensearch logs..."
|
@echo "📋 Showing opensearch logs..."
|
||||||
docker compose logs -f opensearch
|
docker compose $(OPENRAG_ENV_FILE) logs -f opensearch
|
||||||
|
|
||||||
# Shell access
|
# Shell access
|
||||||
shell-be:
|
shell-be:
|
||||||
@echo "🐚 Opening shell in backend container..."
|
@echo "🐚 Opening shell in backend container..."
|
||||||
docker compose exec openrag-backend /bin/bash
|
docker compose $(OPENRAG_ENV_FILE) exec openrag-backend /bin/bash
|
||||||
|
|
||||||
shell-lf:
|
shell-lf:
|
||||||
@echo "🐚 Opening shell in langflow container..."
|
@echo "🐚 Opening shell in langflow container..."
|
||||||
docker compose exec langflow /bin/bash
|
docker compose $(OPENRAG_ENV_FILE) exec langflow /bin/bash
|
||||||
|
|
||||||
shell-os:
|
shell-os:
|
||||||
@echo "🐚 Opening shell in opensearch container..."
|
@echo "🐚 Opening shell in opensearch container..."
|
||||||
docker compose exec opensearch /bin/bash
|
docker compose $(OPENRAG_ENV_FILE) exec opensearch /bin/bash
|
||||||
|
|
||||||
# Testing and quality
|
# Testing and quality
|
||||||
test:
|
test:
|
||||||
|
|
@ -414,7 +417,7 @@ lint:
|
||||||
# Service status
|
# Service status
|
||||||
status:
|
status:
|
||||||
@echo "📊 Container status:"
|
@echo "📊 Container status:"
|
||||||
@docker compose ps 2>/dev/null || echo "No containers running"
|
@docker compose $(OPENRAG_ENV_FILE) ps 2>/dev/null || echo "No containers running"
|
||||||
|
|
||||||
health:
|
health:
|
||||||
@echo "🏥 Health check:"
|
@echo "🏥 Health check:"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue