Skip to content

Commit

Permalink
enabled Brotli support in Swoole
Browse files Browse the repository at this point in the history
  • Loading branch information
deminy committed Jun 8, 2024
1 parent a4c2c01 commit 5fe0d9b
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Table of Contents

### Changed
- Upgrade _Composer_ from 2.6.6 to 2.7.6.
- Enabled Brotli support in Swoole.

## 5.1.2

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.alpine.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS {% if option_curl == true %}curl-dev{% endif %} {% if php_version|slice(0, 2) != '7.' and php_version|slice(0, 3) not in ['8.0', '8.1'] %}linux-headers {% endif %}postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS {% if option_curl == true %}curl-dev{% endif %} {% if php_version|slice(0, 2) != '7.' and php_version|slice(0, 3) not in ['8.0', '8.1'] %}linux-headers {% endif %}brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
{%~ if php_extensions is not empty %}
Expand All @@ -33,6 +33,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets {% if option_curl == true %}--enable-swoole-curl {% endif %}{% if option_json == true %}--enable-swoole-json {% endif %}&& \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.cli.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN \
{%~ if option_curl == true %}
libcurl4-openssl-dev \
{%~ endif %}
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand Down Expand Up @@ -53,6 +54,7 @@ RUN \
install-swoole.sh {% if swoole_version == "nightly" %}master{% else %}{{ swoole_version }}{% endif %} \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets {% if option_curl == true %}--enable-swoole-curl {% endif %}{% if option_json == true %}--enable-swoole-json {% endif %}&& \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/5.1.3/php8.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/5.1.3/php8.0/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN \
apt-get update && \
apt-get install -y \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -29,6 +30,7 @@ RUN \
install-swoole.sh 5.1.3 \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/5.1.3/php8.1/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/5.1.3/php8.1/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN \
apt-get update && \
apt-get install -y \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -29,6 +30,7 @@ RUN \
install-swoole.sh 5.1.3 \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/5.1.3/php8.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/5.1.3/php8.2/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN \
apt-get update && \
apt-get install -y \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -29,6 +30,7 @@ RUN \
install-swoole.sh 5.1.3 \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/5.1.3/php8.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/5.1.3/php8.3/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN \
apt-get update && \
apt-get install -y \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -29,6 +30,7 @@ RUN \
install-swoole.sh 5.1.3 \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/nightly/php8.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/nightly/php8.0/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN \
# @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload
inotify-tools \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -37,6 +38,7 @@ RUN \
install-swoole.sh master \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/nightly/php8.1/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/nightly/php8.1/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN \
# @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload
inotify-tools \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -37,6 +38,7 @@ RUN \
install-swoole.sh master \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/nightly/php8.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/nightly/php8.2/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN \
# @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload
inotify-tools \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -37,6 +38,7 @@ RUN \
install-swoole.sh master \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/nightly/php8.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN \
set -ex && \
apk update && \
apk add --no-cache libstdc++ libpq && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers brotli-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \
# PHP extension pdo_mysql is included since 4.8.12+ and 5.0.1+.
docker-php-ext-install pdo_mysql && \
pecl channel-update pecl.php.net && \
Expand All @@ -21,6 +21,7 @@ RUN \
docker-php-ext-configure swoole \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
docker-php-ext-install -j$(nproc) swoole && \
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/nightly/php8.3/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN \
# @see https://github.com/swoole/docker-swoole/tree/master/examples/00-autoreload
inotify-tools \
libcurl4-openssl-dev \
libbrotli-dev \
libpq-dev \
libssl-dev \
supervisor \
Expand All @@ -37,6 +38,7 @@ RUN \
install-swoole.sh master \
--enable-mysqlnd \
--enable-swoole-pgsql \
--enable-brotli \
--enable-openssl \
--enable-sockets --enable-swoole-curl && \
mkdir -p /var/log/supervisor && \
Expand Down

0 comments on commit 5fe0d9b

Please sign in to comment.