Skip to content

Commit af8e3d9

Browse files
committed
Update to latest swoole extension
1 parent 6a2af21 commit af8e3d9

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

bin/install

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ done
4747
"${MDEV}" redis FLUSHALL
4848
"${MDEV}" exec db mysql -uroot -proot -e "DROP DATABASE IF EXISTS magento2; CREATE DATABASE IF NOT EXISTS magento2;"
4949

50-
SEARCH=" --search-engine=elasticsearch7 --elasticsearch-host=elastic "
51-
# " --search-engine=opensearch --opensearch-host=elastic"
50+
SEARCH=" --search-engine=opensearch --opensearch-host=elastic "
5251

5352
AMQP=" --amqp-host rabbit --amqp-port 5672 --amqp-user guest --amqp-password guest "
5453

bin/sync

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ case "$COMMAND" in
3535
;;
3636

3737
start)
38+
mutagen sync terminate --label-selector "$PROJECT_NAME"
3839
# sync files from local to docker immediately,
3940
# local is alpha here, so it will rewrite all your changes made on the docker side
4041
mutagen sync create ${MDEV_DIR}/src docker://${APP_CONTAINER}/magento \

build/php/Dockerfile

+18-13
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,22 @@ RUN if [ "$XDEBUG" = "0" ]; then \
8181
&& docker-php-ext-install -j$(nproc) spx; \
8282
fi;
8383

84-
ARG SWOOLE_VERSION=4.8.6
85-
RUN mkdir /usr/src/php/ext/swoole && \
86-
curl -sfL https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -o swoole.tar.gz && \
87-
tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole && \
88-
docker-php-ext-configure swoole \
89-
--enable-http2 \
84+
ARG SWOOLE_VERSION=5.0.2
85+
RUN mkdir /usr/src/php/ext/swoole \
86+
&& curl -sfL https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -o swoole.tar.gz \
87+
&& tar xfz swoole.tar.gz --strip-components=1 -C /usr/src/php/ext/swoole \
88+
&& docker-php-ext-configure swoole \
9089
--enable-mysqlnd \
9190
--enable-openssl \
92-
--enable-sockets --enable-swoole-curl --enable-swoole-json && \
93-
docker-php-ext-install -j$(nproc) swoole
91+
--enable-sockets --enable-swoole-curl \
92+
&& docker-php-ext-install -j$(nproc) swoole
93+
94+
RUN mkdir /usr/src/php/ext/meminfo \
95+
&& git clone https://github.com/BitOne/php-meminfo.git /tmp/meminfo \
96+
&& cp -R /tmp/meminfo/extension/* /usr/src/php/ext/meminfo && ls /usr/src/php/ext/meminfo \
97+
&& docker-php-ext-configure meminfo \
98+
&& docker-php-ext-install -j$(nproc) meminfo
99+
94100

95101
RUN php --version && php -m
96102
# RUN php -r 'print_r(gd_info());'
@@ -145,14 +151,13 @@ COPY env/php-fpm.conf /usr/local/etc/php-fpm.conf
145151

146152
RUN curl -sS https://getcomposer.org/installer | php -- --2.2 --install-dir=/usr/local/bin --filename=composer
147153

148-
149154
#Setup sendmail in php
150-
RUN echo '#!/usr/bin/php' > /usr/local/bin/sendmail \
151-
&& chmod +x /usr/local/bin/sendmail
155+
RUN echo "#!/usr/bin/php\nfile_put_contents('/tmp/mail', stream_get_contents(STDIN) . PHP_EOL);" > /usr/local/bin/sendmail \
156+
&& chmod +x /usr/local/bin/sendmail
152157

153158
# Clean Up
154-
RUN rm -rf /var/cache/apk/* && \
155-
rm -rf /tmp/* /var/tmp/*
159+
RUN rm -rf /var/cache/apk/* \
160+
&& rm -rf /tmp/* /var/tmp/*
156161

157162
# @todo Add test with container/root/tests/php-fpm/base.goss.yaml
158163

etc/php/php.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ spx.http_ip_whitelist="*"
5757
; Mail hog
5858
;sendmail_path = /usr/sbin/sendmail -S mail:1025
5959
; save in file
60-
sendmail_path="cat - >> /tmp/mails"
60+

mdev

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ trap 'error "$(printf "Command \`%s\` at $BASH_SOURCE:$LINENO failed with exit c
66
readonly MDEV_DIR="$(
77
cd "$(
88
dirname "$(
9-
(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}") \
10-
| sed -e "s#^../#$(dirname "$(dirname "${BASH_SOURCE[0]}")")/#"
9+
(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")
1110
)"
1211
)" >/dev/null \
1312
&& pwd

0 commit comments

Comments
 (0)