#!/bin/bash

# Si vendor no existe, instalar dependencias
if [ ! -d "vendor" ]; then
    composer install --no-interaction
fi

# Limpiar cache si es necesario
php artisan config:clear 2>/dev/null || true

# Ejecutar Apache en primer plano
apache2-foreground