Skip to content

Commit

Permalink
Merge pull request #9511 from joanhey/ubiquity-php8.4
Browse files Browse the repository at this point in the history
[php] Ubiquity update to PHP/8.4
  • Loading branch information
msmith-techempower authored Jan 9, 2025
2 parents 8420305 + 2f74daf commit a417d50
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 43 deletions.
8 changes: 4 additions & 4 deletions frameworks/PHP/ubiquity/ubiquity-ngx-micro.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -8,14 +8,14 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null

RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \
zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
zlib1g-dev libpcre3-dev libargon2-dev libsodium-dev \
php8.3-cli php8.3-dev php8.3-mbstring libphp8.3-embed nginx > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

ADD ./ ./
COPY ./ ./

ENV NGINX_VERSION=1.25.3
ENV NGINX_VERSION=1.27.3

RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null

Expand Down
8 changes: 4 additions & 4 deletions frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -8,14 +8,14 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null

RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \
zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
zlib1g-dev libpcre3-dev libargon2-dev libsodium-dev \
php8.3-cli php8.3-dev libphp8.3-embed php8.3-pgsql nginx > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

ADD ./ ./
COPY ./ ./

ENV NGINX_VERSION=1.25.3
ENV NGINX_VERSION=1.27.3

RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null

Expand Down
8 changes: 4 additions & 4 deletions frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -8,14 +8,14 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null

RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \
zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
zlib1g-dev libpcre3-dev libargon2-dev libsodium-dev \
php8.3-cli php8.3-dev libphp8.3-embed php8.3-pgsql nginx > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

ADD ./ ./
COPY ./ ./

ENV NGINX_VERSION=1.25.3
ENV NGINX_VERSION=1.27.3

RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null

Expand Down
4 changes: 2 additions & 2 deletions frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM phpswoole/swoole:5.1.3-php8.3
FROM phpswoole/swoole:php8.4

RUN docker-php-ext-install pcntl opcache > /dev/null

COPY deploy/conf/php-async.ini /usr/local/etc/php/php.ini

WORKDIR /ubiquity
ADD --link . .
COPY --link . .

RUN chmod -R 777 /ubiquity

Expand Down
4 changes: 2 additions & 2 deletions frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phpswoole/swoole:5.1.3-php8.3
FROM phpswoole/swoole:php8.4

RUN apt-get install -y libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
Expand All @@ -7,7 +7,7 @@ RUN apt-get install -y libpq-dev \
COPY deploy/conf/php-async.ini /usr/local/etc/php/php.ini

WORKDIR /ubiquity
ADD --link . .
COPY --link . .

RUN chmod -R 777 /ubiquity

Expand Down
14 changes: 7 additions & 7 deletions frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq git php8.3-cli php8.3-mysql php8.3-xml php8.3-mbstring > /dev/null
apt-get install -yqq git php8.4-cli php8.4-mysql php8.4-xml php8.4-mbstring > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null
RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini
RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini

COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini
COPY deploy/conf/php-async.ini /etc/php/8.4/cli/php.ini

ADD ./ /ubiquity
WORKDIR /ubiquity
Expand All @@ -30,8 +30,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/*

COPY deploy/conf/workerman/mysql/workerServices.php app/config/workerServices.php

RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/cli/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini
RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.4/cli/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.4/cli/php.ini

EXPOSE 8080

Expand Down
14 changes: 7 additions & 7 deletions frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq git php8.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null
apt-get install -yqq git php8.4-cli php8.4-pgsql php8.4-xml php8.4-mbstring > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null
RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini
RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini

COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini
COPY deploy/conf/php-async.ini /etc/php/8.4/cli/php.ini

ADD ./ /ubiquity
WORKDIR /ubiquity
Expand All @@ -30,8 +30,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/*

COPY deploy/conf/workerman/pgsql/raw/workerServices.php app/config/workerServices.php

RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.3/cli/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini
RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.4/cli/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.4/cli/php.ini

EXPOSE 8080

Expand Down
14 changes: 7 additions & 7 deletions frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq git php8.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null
apt-get install -yqq git php8.4-cli php8.4-pgsql php8.4-xml php8.4-mbstring > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null
RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini
RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini

COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini
COPY deploy/conf/php-async.ini /etc/php/8.4/cli/php.ini

ADD ./ /ubiquity
WORKDIR /ubiquity
Expand All @@ -30,8 +30,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/*

COPY deploy/conf/workerman/pgsql/workerServices.php app/config/workerServices.php

RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.3/cli/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.3/cli/php.ini
RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.4/cli/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.4/cli/php.ini

EXPOSE 8080

Expand Down
12 changes: 6 additions & 6 deletions frameworks/PHP/ubiquity/ubiquity.dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM ubuntu:20.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-dev > /dev/null
apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql php8.4-dev > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY deploy/conf/* /etc/php/8.3/fpm/
COPY deploy/conf/* /etc/php/8.4/fpm/

ADD ./ /ubiquity
WORKDIR /ubiquity

RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi;
RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet

RUN chmod 777 -R /ubiquity/app/cache/*

COPY deploy/conf/ubiquity-config.php app/config/config.php

RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/fpm/php.ini
RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.4/fpm/php.ini

EXPOSE 8080

CMD service php8.3-fpm start && \
CMD service php8.4-fpm start && \
nginx -c /ubiquity/deploy/nginx.conf -g "daemon off;"

0 comments on commit a417d50

Please sign in to comment.