fix: copy PHP files before composer install (classmap needs them)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-04-24 16:20:41 +01:00
parent 234b13ee31
commit 498b667903

View file

@ -14,14 +14,12 @@ RUN apk add --no-cache nginx supervisor
# Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Backend PHP deps (separate layer so code changes don't bust cache)
# Backend PHP files + deps
WORKDIR /var/www/html/lux-studio/api
COPY backend/*.php ./
COPY backend/composer.json ./
RUN composer install --no-dev --optimize-autoloader --no-interaction --no-security-blocking
# Backend PHP files
COPY backend/*.php ./
# Built frontend
COPY --from=builder /build/dist /var/www/html/lux-studio