fix: composer dependencies install

This commit is contained in:
Víctor Falcón 2026-01-16 19:25:18 +01:00
parent 7fa9d620b2
commit b2ae8cdb07
1 changed files with 8 additions and 7 deletions

View File

@ -616,11 +616,18 @@ install() {
echo ""
# Install Composer dependencies BEFORE starting Docker services
# (Docker Compose mounts files from vendor/laravel/sail that need to exist)
echo -e "${BLUE}Installing Composer dependencies...${NC}"
composer install --no-interaction --prefer-dist --optimize-autoloader
echo -e "${GREEN}Composer dependencies installed.${NC}"
echo ""
# Setup SSL certificates before starting Caddy
setup_ssl_certificates
echo ""
# Start Docker services (but don't start PHP yet - we'll start it after dependencies are installed)
# Start Docker services (but don't start PHP yet - we'll start it after APP_KEY is generated)
echo -e "${BLUE}Starting Docker services (excluding PHP for now)...${NC}"
docker compose up -d mysql redis caddy mailhog
@ -628,12 +635,6 @@ install() {
wait_for_service "redis"
echo ""
# Install Composer dependencies
echo -e "${BLUE}Installing Composer dependencies...${NC}"
composer install --no-interaction --prefer-dist --optimize-autoloader
echo -e "${GREEN}Composer dependencies installed.${NC}"
echo ""
# Generate APP_KEY if not set (after Composer dependencies are installed)
if ! grep -q "APP_KEY=base64:" .env 2>/dev/null || grep -q "APP_KEY=$" .env 2>/dev/null; then
echo -e "${YELLOW}Generating application key...${NC}"