#!/bin/bash
# Простая версия build.sh для базовой сборки

echo "🏗️ Simple build check..."

# Проверка docker-compose.yml
if [ -f docker-compose.yml ]; then
    echo "✅ docker-compose.yml found"
    # Простая проверка синтаксиса (если docker-compose доступен)
    command -v docker-compose >/dev/null 2>&1 && {
        echo "🔍 Checking docker-compose syntax..."
        docker-compose config --quiet && echo "✅ docker-compose.yml is valid" || echo "❌ docker-compose.yml has issues"
    }
else
    echo "⚠️ docker-compose.yml not found"
fi

# Проверка Dockerfile
echo "📋 Checking for Dockerfiles:"
find . -name "Dockerfile*" -exec echo "Found: {}" \;

# Проверка package.json (frontend)
if [ -f frontend/linktree-frontend/package.json ]; then
    echo "✅ Frontend package.json found"
else
    echo "⚠️ Frontend package.json not found"
fi

# Проверка requirements.txt (backend)
if [ -f backend/requirements.txt ]; then
    echo "✅ Backend requirements.txt found"
else
    echo "⚠️ Backend requirements.txt not found"
fi

echo "✅ Simple build check completed"