MVP Build
This commit is contained in:
74
Makefile
Normal file
74
Makefile
Normal file
@@ -0,0 +1,74 @@
|
||||
.PHONY: help setup dev stop clean test logs shell-backend shell-frontend migrate rebuild
|
||||
|
||||
help:
|
||||
@echo "MotoVaultPro - Fully Containerized Modified Feature Capsule Architecture"
|
||||
@echo "Commands:"
|
||||
@echo " make setup - Initial project setup"
|
||||
@echo " make dev - Start all services in development mode"
|
||||
@echo " make rebuild - Rebuild and restart containers (for code changes)"
|
||||
@echo " make stop - Stop all services"
|
||||
@echo " make clean - Clean all data and volumes"
|
||||
@echo " make test - Run tests in containers"
|
||||
@echo " make logs - View logs from all services"
|
||||
@echo " make logs-backend - View backend logs only"
|
||||
@echo " make logs-frontend - View frontend logs only"
|
||||
@echo " make shell-backend - Open shell in backend container"
|
||||
@echo " make shell-frontend- Open shell in frontend container"
|
||||
@echo " make migrate - Run database migrations"
|
||||
|
||||
setup:
|
||||
@echo "Setting up MotoVaultPro..."
|
||||
@cp .env.example .env
|
||||
@echo "Please update .env with your Auth0 and API credentials"
|
||||
@echo "Building and starting all services..."
|
||||
@docker-compose up -d --build
|
||||
@echo "✅ All services started!"
|
||||
@echo "Frontend: http://localhost:3000"
|
||||
@echo "Backend: http://localhost:3001"
|
||||
@echo "MinIO Console: http://localhost:9001"
|
||||
|
||||
dev:
|
||||
@echo "Starting development environment..."
|
||||
@docker-compose up -d --build
|
||||
@echo "✅ Development environment running!"
|
||||
@echo "Frontend: http://localhost:3000"
|
||||
@echo "Backend: http://localhost:3001/health"
|
||||
@echo "View logs with: make logs"
|
||||
|
||||
stop:
|
||||
@docker-compose down
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up all containers, volumes, and images..."
|
||||
@docker-compose down -v --rmi all
|
||||
@docker system prune -f
|
||||
|
||||
test:
|
||||
@echo "Running backend tests in container..."
|
||||
@docker-compose exec backend npm test
|
||||
|
||||
logs:
|
||||
@docker-compose logs -f
|
||||
|
||||
logs-backend:
|
||||
@docker-compose logs -f backend
|
||||
|
||||
logs-frontend:
|
||||
@docker-compose logs -f frontend
|
||||
|
||||
shell-backend:
|
||||
@docker-compose exec backend sh
|
||||
|
||||
shell-frontend:
|
||||
@docker-compose exec frontend sh
|
||||
|
||||
rebuild:
|
||||
@echo "Rebuilding containers with latest code changes..."
|
||||
@docker-compose up -d --build
|
||||
@echo "✅ Containers rebuilt and restarted!"
|
||||
@echo "Frontend: http://localhost:3000"
|
||||
@echo "Backend: http://localhost:3001/health"
|
||||
|
||||
migrate:
|
||||
@echo "Running database migrations..."
|
||||
@docker-compose exec backend npm run migrate:all
|
||||
Reference in New Issue
Block a user