Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions frameworks/PHP/mixphp/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"framework": "mixphp",
"maintainers": ["onanying"],
"tests": [
{
"default": {
Expand Down
2 changes: 1 addition & 1 deletion frameworks/PHP/mixphp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]
},
"require": {
"workerman/workerman": "^4.0",
"workerman/workerman": "^5.0",
"mix/vega": "~3.0",
"mix/database": "~3.0",
"monolog/monolog": "^2.3"
Expand Down
6 changes: 2 additions & 4 deletions frameworks/PHP/mixphp/mixphp-swoole-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM phpswoole/swoole:6.0.2-php8.4

RUN docker-php-ext-install pcntl opcache bcmath > /dev/null
FROM phpswoole/swoole:php8.5

WORKDIR /mixphp
COPY --link . .
Expand All @@ -13,7 +11,7 @@ RUN echo "opcache.jit_buffer_size=256M" >> /usr/local/etc/php/php.ini

RUN php -v && php -i | grep opcache

RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null
RUN composer install --no-dev --classmap-authoritative --quiet
RUN composer dumpautoload -o

RUN mkdir -p /mixphp/runtime/logs
Expand Down
17 changes: 8 additions & 9 deletions frameworks/PHP/mixphp/mixphp-workerman-mysql.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ 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 && apt-get install -yqq git unzip wget curl build-essential php8.4-cli php8.4-mbstring php8.4-curl php8.4-xml php8.4-mysql > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null
RUN apt-get update -yqq && apt-get install -yqq git curl php8.5-cli php8.5-mbstring php8.5-curl php8.5-xml php8.5-mysql > /dev/null

RUN apt-get install -y php8.4-dev libevent-dev > /dev/null
RUN wget http://pear.php.net/go-pear.phar --quiet && php go-pear.phar
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini
RUN apt-get install -y php8.5-dev libevent-dev > /dev/null
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.5/cli/conf.d/event.ini

COPY php-jit.ini /etc/php/8.4/cli/php.ini
COPY php-jit.ini /etc/php/8.5/cli/php.ini

ADD ./ /mixphp
WORKDIR /mixphp
COPY . .

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null
COPY --from=composer/composer:2-bin --link /composer /usr/local/bin/composer
RUN composer install --no-dev --classmap-authoritative --quiet
RUN composer dumpautoload -o

RUN mkdir -p /mixphp/runtime/logs
Expand Down
17 changes: 8 additions & 9 deletions frameworks/PHP/mixphp/mixphp-workerman-pgsql.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ 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 && apt-get install -yqq git unzip wget curl build-essential php8.4-cli php8.4-mbstring php8.4-curl php8.4-xml php8.4-pgsql > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null
RUN apt-get update -yqq && apt-get install -yqq git curl php8.5-cli php8.5-mbstring php8.5-curl php8.5-xml php8.5-pgsql > /dev/null

RUN apt-get install -y php8.4-dev libevent-dev > /dev/null
RUN wget http://pear.php.net/go-pear.phar --quiet && php go-pear.phar
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini
RUN apt-get install -y php8.5-dev libevent-dev > /dev/null
RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.5/cli/conf.d/event.ini

COPY php-jit.ini /etc/php/8.4/cli/php.ini
COPY php-jit.ini /etc/php/8.5/cli/php.ini

ADD ./ /mixphp
WORKDIR /mixphp
COPY . .

RUN sed -i "s|Benchmark();|BenchmarkRaw();|g" /mixphp/routes/index.php

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null
COPY --from=composer/composer:2-bin --link /composer /usr/local/bin/composer
RUN composer install --no-dev --classmap-authoritative --quiet
RUN composer dumpautoload -o

RUN mkdir -p /mixphp/runtime/logs
Expand Down
16 changes: 8 additions & 8 deletions frameworks/PHP/mixphp/mixphp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ 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 && apt-get install -yqq git unzip wget curl build-essential nginx php8.4-fpm php8.4-mysql php8.4-dev > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null
RUN apt-get update -yqq && apt-get install -yqq git curl nginx php8.5-fpm php8.5-mysql > /dev/null

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

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

ADD ./ /mixphp
WORKDIR /mixphp
COPY . .

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null
COPY --from=composer/composer:2-bin --link /composer /usr/local/bin/composer
RUN composer install --no-dev --classmap-authoritative --quiet
RUN composer dumpautoload -o

RUN mkdir -p /mixphp/runtime/logs
RUN chmod -R 777 /mixphp/runtime/logs

EXPOSE 8080

CMD service php8.4-fpm start && \
CMD service php8.5-fpm start && \
nginx -c /mixphp/deploy/nginx.conf
Loading