- Updated Dockerfile configurations for various environments (alpine, basic, cloudrun, minimal, simple, test) to ensure compatibility with Laravel 5.0 and PHP 5.6. - Added PHP compatibility documentation outlining mcrypt requirements and upgrade paths. - Created cloudbuild.yaml for Google Cloud Build integration to streamline deployment to Cloud Run. - Introduced docker-compose.local.yml for local development with MySQL and Redis services. - Enhanced rebuild.sh script for easier local development and migration handling. - Updated Laravel Blade views to correct asset paths. - Added start-local.sh script for quick local setup and service management.
40 lines
1.0 KiB
Docker
40 lines
1.0 KiB
Docker
# Bare minimum working Dockerfile for Laravel 5.0
|
|
FROM php:5.6-apache
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
# Install absolute essentials only
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
curl \
|
|
git \
|
|
libmcrypt-dev \
|
|
&& docker-php-ext-install \
|
|
pdo \
|
|
pdo_mysql \
|
|
mcrypt \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Composer
|
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
|
|
|
# Enable Apache rewrite
|
|
RUN a2enmod rewrite
|
|
|
|
# Configure Apache for Laravel
|
|
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
|
|
|
|
# Copy app and set permissions
|
|
COPY . /var/www/html/
|
|
RUN chown -R www-data:www-data /var/www/html
|
|
|
|
# Basic Laravel setup
|
|
RUN if [ ! -f .env ]; then cp .env.example .env; fi
|
|
RUN composer install --no-dev --no-interaction --ignore-platform-reqs
|
|
RUN php artisan key:generate || true
|
|
|
|
EXPOSE 80
|
|
CMD ["apache2-foreground"]
|