This commit is contained in:
Ahmed Darrazi 2025-12-16 21:27:48 +01:00
parent b9fdd33fa4
commit ed0135cab5

View File

@ -84,6 +84,9 @@ COPY docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Copy application code # Copy application code
COPY --chown=www-data:www-data . . COPY --chown=www-data:www-data . .
# Remove conflicting file causing PSR-4 autoloading errors
RUN rm -f Modules/Exam/app/Services/Exam-ResourceService.php
# Copy built assets from node stage # Copy built assets from node stage
COPY --from=node-builder --chown=www-data:www-data /app/public/build ./public/build COPY --from=node-builder --chown=www-data:www-data /app/public/build ./public/build
@ -156,4 +159,4 @@ HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=5 \
CMD curl -f http://localhost:80/health || curl -f http://localhost:80/test.php || exit 1 CMD curl -f http://localhost:80/health || curl -f http://localhost:80/test.php || exit 1
# Start supervisor # Start supervisor
CMD ["sh", "-c", "mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache && chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache && touch storage/installed public/installed && if [ -f .env ]; then chmod 666 .env; fi && php artisan optimize:clear && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf"] CMD ["sh", "-c", "mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache storage/app && touch storage/installed storage/app/installed public/installed && chown -R www-data:www-data storage bootstrap/cache public/installed && chmod -R 775 storage bootstrap/cache && if [ -f .env ]; then chmod 666 .env || true; fi && php artisan migrate --force && php artisan optimize:clear && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf"]