Spaces:
Sleeping
Sleeping
File size: 1,501 Bytes
d2ba52b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
.PHONY: help build up down logs clean restart status health
# Default target
help:
@echo "Fashion Analyzer - Docker Compose Commands"
@echo ""
@echo "Available commands:"
@echo " build - Build all services"
@echo " up - Start all services"
@echo " down - Stop all services"
@echo " logs - View logs from all services"
@echo " clean - Stop services and remove volumes"
@echo " restart - Restart all services"
@echo " status - Show service status"
@echo " health - Check application health"
@echo " shell-api - Open shell in FastAPI container"
# Build all services
build:
docker-compose build
# Start all services
up:
docker-compose up -d
@echo "Services starting... Check status with 'make status'"
@echo "Web interface will be available at: http://localhost:7860"
# Stop all services
down:
docker-compose down
# View logs
logs:
docker-compose logs -f
# Clean everything (including volumes)
clean:
docker-compose down -v --remove-orphans
docker system prune -f
# Restart all services
restart: down up
# Show service status
status:
docker-compose ps
# Check application health
health:
@echo "Checking FastAPI health..."
@curl -s http://localhost:7860/health > /dev/null && echo "β
FastAPI: Healthy" || echo "β FastAPI: Unhealthy"
# Open shell in FastAPI container
shell-api:
docker-compose exec fastapi bash
# Development commands
dev-build:
docker-compose build --no-cache
dev-logs-api:
docker-compose logs -f fastapi
|