Replaced legacy 'nnks.truckwash.dk' endpoint with 'api.truckwash.dk' across the codebase for consistency. Implemented a feature to handle certificate downloads, including file serving and validation. Updated PHP configuration to support additional dependencies like PHPMailer, and introduced necessary route and configuration changes for wash certificate processing.
45 lines
1.1 KiB
Docker
45 lines
1.1 KiB
Docker
# Use the official PHP 8.2 image with Apache disabled
|
|
FROM php:8.2-fpm
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /var/www/html
|
|
|
|
# Install Composer globally
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
|
|
# Install required extensions and dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
libpng-dev \
|
|
libonig-dev \
|
|
libxml2-dev \
|
|
zip \
|
|
git \
|
|
curl \
|
|
libzip-dev \
|
|
&& docker-php-ext-install mbstring exif pcntl bcmath gd pdo_mysql mysqli zip
|
|
|
|
# Copy application files into the container
|
|
COPY /nginx/app /var/www/html
|
|
|
|
# Set the appropriate permissions for the working directory
|
|
RUN chown -R www-data:www-data /var/www/html \
|
|
&& chmod -R 755 /var/www/html
|
|
|
|
# Require the phpmailer/phpmailer package
|
|
RUN composer require phpmailer/phpmailer
|
|
|
|
# Install using Composer
|
|
RUN composer install --no-dev
|
|
|
|
# Install the /var/www/html/modules/washcertificates directory
|
|
WORKDIR /var/www/html/modules/washcertificates
|
|
RUN composer install --no-dev
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
# Expose port 9000
|
|
EXPOSE 9000
|
|
|
|
# Start PHP-FPM when the container starts
|
|
CMD ["php-fpm"] |