Skip to content

Commit 834104f

Browse files
Merge pull request #9550 from joanhey/reactphp--libuv
[php] Reactphp add libuv variant
2 parents 90a7589 + a614fcf commit 834104f

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

frameworks/PHP/reactphp/benchmark_config.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,28 @@
1717
"webserver": "None",
1818
"os": "Linux",
1919
"database_os": "Linux",
20-
"display_name": "reactphp",
20+
"display_name": "reactphp [libevent]",
2121
"notes": "",
2222
"versus": "php"
23+
},
24+
"libuv": {
25+
"json_url": "/json",
26+
"plaintext_url": "/plaintext",
27+
"port": 8080,
28+
"approach": "Realistic",
29+
"classification": "Platform",
30+
"framework": "reactphp",
31+
"language": "PHP",
32+
"flavor": "PHP8",
33+
"database": "MySQL",
34+
"orm": "Raw",
35+
"platform": "reactphp",
36+
"webserver": "None",
37+
"os": "Linux",
38+
"database_os": "Linux",
39+
"display_name": "reactphp [libuv]",
40+
"notes": "",
41+
"versus": "reactphp"
2342
}
2443
}]
2544
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM ubuntu:24.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
6+
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null
7+
RUN apt-get update -yqq > /dev/null && \
8+
apt-get install -yqq git unzip wget curl build-essential \
9+
php8.4-cli php8.4-mbstring php8.4-dev php8.4-xml > /dev/null
10+
11+
# An extension is required!
12+
# We deal with concurrencies over 1k, which stream_select doesn't support.
13+
# libuv
14+
RUN apt-get install -yqq libuv1-dev > /dev/null \
15+
&& pecl install uv-beta > /dev/null \
16+
&& echo "extension=uv.so" > /etc/php/8.4/cli/conf.d/uv.ini
17+
18+
# libevent
19+
# RUN apt-get install -y libevent-dev > /dev/null \
20+
# && pecl install event-3.1.4 > /dev/null \
21+
# && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini
22+
23+
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
24+
25+
COPY --link deploy/conf/* /etc/php/8.4/cli/conf.d/
26+
27+
WORKDIR /reactphp
28+
COPY --link . .
29+
30+
RUN composer install --prefer-dist --optimize-autoloader --no-dev --quiet
31+
32+
EXPOSE 8080
33+
34+
ENTRYPOINT ["/usr/bin/php"]
35+
CMD ["server.php"]

frameworks/PHP/reactphp/reactphp.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ COPY --link deploy/conf/* /etc/php/8.4/cli/conf.d/
2727
WORKDIR /reactphp
2828
COPY --link . .
2929

30-
RUN composer install --prefer-dist --optimize-autoloader --no-dev
30+
RUN composer install --prefer-dist --optimize-autoloader --no-dev --quiet
3131

3232
EXPOSE 8080
3333

0 commit comments

Comments
 (0)