mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor, docker
This commit is contained in:
+37
-19
@@ -1,12 +1,10 @@
|
||||
FROM php:7.4-fpm
|
||||
FROM php:8.3-fpm
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug
|
||||
|
||||
RUN docker-php-ext-install pdo pdo_mysql
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
@@ -15,25 +13,45 @@ RUN apt-get update && apt-get install -y \
|
||||
cron \
|
||||
supervisor \
|
||||
nano \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Xdebug (compatible with PHP 8.3)
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install pdo pdo_mysql
|
||||
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) gd \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-install bcmath
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-install bcmath
|
||||
|
||||
COPY --from=composer:1.9.3 /usr/bin/composer /usr/bin/composer
|
||||
# Install Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
#NODEJS & NPM
|
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||
RUN apt-get -y install nodejs
|
||||
#NODEJS & NPM (OLD Before upgrade)
|
||||
# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
||||
# RUN apt-get -y install nodejs
|
||||
|
||||
RUN chown -R www-data:www-data /var/www
|
||||
RUN chmod 755 /var/www
|
||||
#NODEJS & NPM (Node 14 for x86_64 (amd64))
|
||||
# RUN curl -fsSL https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz -o node.tar.xz \
|
||||
# && tar -xJf node.tar.xz -C /usr/local --strip-components=1 \
|
||||
# && rm node.tar.xz
|
||||
|
||||
# Configure xdebug
|
||||
RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.remote_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.remote_port=9002" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
# NODEJS & NPM (Node 14 for ARM64)
|
||||
RUN curl -fsSL https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-arm64.tar.xz -o node.tar.xz \
|
||||
&& tar -xJf node.tar.xz -C /usr/local --strip-components=1 \
|
||||
&& rm node.tar.xz
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R www-data:www-data /var/www \
|
||||
&& chmod 755 /var/www
|
||||
|
||||
# Configure Xdebug
|
||||
RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.client_port=9002" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
RUN echo "xdebug.idekey=VSCODE" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
|
||||
# Moved to docker-setup folder
|
||||
|
||||
Reference in New Issue
Block a user