Remove yakpro-po obfuscation steps from Dockerfile due to PHP 7.0 compatibility issues
All checks were successful
Deploy Development / deploy (push) Successful in 2m14s
All checks were successful
Deploy Development / deploy (push) Successful in 2m14s
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -57,24 +57,15 @@ RUN composer install --no-dev --no-interaction --prefer-dist
|
||||
# Generate application key
|
||||
RUN php artisan key:generate || true
|
||||
|
||||
# Install yakpro-po for code obfuscation
|
||||
RUN cd /tmp && \
|
||||
git clone https://github.com/pk-fr/yakpro-po.git && \
|
||||
cd yakpro-po && \
|
||||
chmod +x yakpro-po.php
|
||||
|
||||
# Obfuscate application code (app directory only, preserve vendor)
|
||||
RUN php /tmp/yakpro-po/yakpro-po.php \
|
||||
--config-file /var/www/html/yakpro-po.cnf \
|
||||
/var/www/html/app \
|
||||
-o /var/www/html/app_obfuscated && \
|
||||
rm -rf /var/www/html/app && \
|
||||
mv /var/www/html/app_obfuscated /var/www/html/app && \
|
||||
rm -rf /tmp/yakpro-po
|
||||
|
||||
# Run Laravel 5.0 optimization
|
||||
RUN php artisan clear-compiled && php artisan optimize
|
||||
|
||||
# Note: yakpro-po obfuscation requires PHP 7.1+, incompatible with PHP 7.0
|
||||
# For code protection with PHP 7.0, consider:
|
||||
# 1. ionCube Encoder (commercial, most secure)
|
||||
# 2. Keeping source code private and using proper access controls
|
||||
# 3. Using --optimize flag in composer (already done above)
|
||||
|
||||
# Configure Apache DocumentRoot to point to Laravel's public directory
|
||||
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
|
||||
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
|
||||
|
||||
Reference in New Issue
Block a user