File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,8 @@ RUN set -xe; \
143143 amqp-1.11.0 \
144144 xdebug-3.1.5 \
145145 pcov-1.0.11 \
146+ ; \
147+ pecl install -o -f -D 'enable-sockets="yes" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="yes" enable-swoole-curl="yes" enable-cares="no"' swoole-4.8.12 \
146148 ; \
147149 \
148150 # Igbinary: Is a drop in replacement for the standard php serializer.
@@ -163,6 +165,7 @@ RUN set -xe; \
163165 amqp \
164166 xdebug \
165167 pcov \
168+ swoole \
166169 igbinary \
167170 msgpack \
168171 redis \
@@ -340,6 +343,11 @@ VOLUME ${LOG_PATH}
340343
341344ENTRYPOINT ["/sbin/tini" , "--" , "/entrypoint.sh" ]
342345
346+ # HEALTHCHECK --start-period=5s --interval=30s --timeout=5s --retries=3 CMD php artisan octane:status || exit 1
347+
348+ # # Override stop signal to stop process gracefully
349+ # STOPSIGNAL SIGQUIT
350+
343351# set recommended PHP.ini settings
344352# see https://secure.php.net/manual/en/opcache.installation.php
345353RUN { \
Original file line number Diff line number Diff line change @@ -126,7 +126,15 @@ php --ini
126126
127127if [ " $CONTAINER_ROLE " = " APP" ]; then
128128
129- exec php artisan serve --host=0.0.0.0 --port=8000
129+ if [[ ${WITH_OCTANE:- false} == true ]]; then
130+ printf " \033[34m[$CONTAINER_ROLE ] Running with Laravel Octane ...\033[0m\n"
131+
132+ exec /usr/local/bin/php -d variables_order=EGPCS artisan octane:start --server=swoole --max-requests=100000 --host=0.0.0.0 --port=8000
133+ fi
134+
135+ printf " \033[34m[$CONTAINER_ROLE ] Running with Laravel Serve ...\033[0m\n"
136+
137+ exec /usr/local/bin/php -d variables_order=GPCS artisan serve --host=0.0.0.0 --port=8000
130138
131139elif [ " $CONTAINER_ROLE " = " QUEUE" ]; then
132140 printf " \n\033[34m[$CONTAINER_ROLE ] Running the [QUEUE-WORKER] Service ...\033[0m\n"
You can’t perform that action at this time.
0 commit comments