dev #1

Merged
webmaster merged 19 commits from dev into main 2025-12-22 15:28:43 +00:00
Showing only changes of commit 0052044d6a - Show all commits

View File

@@ -1,5 +1,5 @@
# Use PHP 7.4 with Apache (compatible with Laravel 5.2 and ARM64)
FROM php:7.4-apache
# Use PHP 7.3 with Apache (compatible with Laravel 5.0)
FROM php:7.3-apache
# Install system dependencies
RUN apt-get update && apt-get install -y \
@@ -14,16 +14,21 @@ RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
openssh-client \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath zip
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath zip tokenizer
# Install mcrypt via PECL (required for Laravel 5.0)
RUN apt-get install -y libmcrypt-dev \
&& pecl install mcrypt-1.0.4 \
&& docker-php-ext-enable mcrypt
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Install Composer
# Install Composer (version 1.x for better compatibility with Laravel 5.0)
COPY --from=composer:1.10 /usr/bin/composer /usr/bin/composer
# Set working directory
@@ -47,14 +52,14 @@ RUN chown -R www-data:www-data /var/www/html \
# Create .env file if it doesn't exist
RUN if [ ! -f .env ]; then cp .env.example .env; fi
# Install PHP dependencies without running post-install scripts
RUN composer install --no-dev --no-scripts --no-interaction
# Install PHP dependencies (Laravel 5.0 compatible)
RUN composer install --no-dev --no-interaction --prefer-dist
# Generate application key
RUN php artisan key:generate
RUN php artisan key:generate || true
# Optimize autoloader
RUN composer dump-autoload --optimize --no-dev
# Run Laravel 5.0 optimization
RUN php artisan clear-compiled && php artisan optimize
# Configure Apache DocumentRoot to point to Laravel's public directory
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public