Skip to content

[php] Update h2o platform to PHP 8.2 #7940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frameworks/PHP/php/php-h2o.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ RUN apt-get update > /dev/null && \
### Install php
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 php8.1 php8.1-common php8.1-cli php8.1-fpm php8.1-mysql > /dev/null
apt-get install -yqq php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null

COPY deploy/conf/* /etc/php/8.1/fpm/
COPY deploy/conf/* /etc/php/8.2/fpm/

RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/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.2/fpm/php-fpm.conf ; fi;

### Install h2o

Expand All @@ -35,5 +35,5 @@ EXPOSE 8080

CMD export WORKERS=$(( 2 * $(nproc) )) && \
sed -i "s/num-threads: x/num-threads: $WORKERS/g" /deploy/h2o.conf && \
service php8.1-fpm start && \
service php8.2-fpm start && \
/h2o/bin/h2o -c /deploy/h2o.conf