diff --git a/8.0-swoole-nginx-prod/supervisor.conf b/8.0-swoole-nginx-prod/supervisor.conf index 312fe84..1737e28 100644 --- a/8.0-swoole-nginx-prod/supervisor.conf +++ b/8.0-swoole-nginx-prod/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole +command = su-exec kool php artisan octane:start +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.0-swoole-nginx/supervisor.conf b/8.0-swoole-nginx/supervisor.conf index b5cdc25..ac7aa23 100644 --- a/8.0-swoole-nginx/supervisor.conf +++ b/8.0-swoole-nginx/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole --watch +command = su-exec kool php artisan octane:start --watch +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.0-swoole-prod/Dockerfile b/8.0-swoole-prod/Dockerfile index b1875ec..27d619a 100644 --- a/8.0-swoole-prod/Dockerfile +++ b/8.0-swoole-prod/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.0-prod -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.0-swoole/Dockerfile b/8.0-swoole/Dockerfile index 12c71b6..0121e31 100644 --- a/8.0-swoole/Dockerfile +++ b/8.0-swoole/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.0-node -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.1-swoole-nginx-prod/supervisor.conf b/8.1-swoole-nginx-prod/supervisor.conf index 312fe84..1737e28 100644 --- a/8.1-swoole-nginx-prod/supervisor.conf +++ b/8.1-swoole-nginx-prod/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole +command = su-exec kool php artisan octane:start +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.1-swoole-nginx/supervisor.conf b/8.1-swoole-nginx/supervisor.conf index b5cdc25..ac7aa23 100644 --- a/8.1-swoole-nginx/supervisor.conf +++ b/8.1-swoole-nginx/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole --watch +command = su-exec kool php artisan octane:start --watch +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.1-swoole-prod/Dockerfile b/8.1-swoole-prod/Dockerfile index 868c47a..281ffd1 100644 --- a/8.1-swoole-prod/Dockerfile +++ b/8.1-swoole-prod/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.1-prod -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.1-swoole/Dockerfile b/8.1-swoole/Dockerfile index 3aaa6a9..68c158f 100644 --- a/8.1-swoole/Dockerfile +++ b/8.1-swoole/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.1-node -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.2-swoole-nginx-prod/supervisor.conf b/8.2-swoole-nginx-prod/supervisor.conf index 312fe84..1737e28 100644 --- a/8.2-swoole-nginx-prod/supervisor.conf +++ b/8.2-swoole-nginx-prod/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole +command = su-exec kool php artisan octane:start +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.2-swoole-nginx/supervisor.conf b/8.2-swoole-nginx/supervisor.conf index b5cdc25..ac7aa23 100644 --- a/8.2-swoole-nginx/supervisor.conf +++ b/8.2-swoole-nginx/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole --watch +command = su-exec kool php artisan octane:start --watch +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.2-swoole-prod/Dockerfile b/8.2-swoole-prod/Dockerfile index 54e654e..5ab1100 100644 --- a/8.2-swoole-prod/Dockerfile +++ b/8.2-swoole-prod/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.2-prod -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.2-swoole/Dockerfile b/8.2-swoole/Dockerfile index caacf3f..09553f4 100644 --- a/8.2-swoole/Dockerfile +++ b/8.2-swoole/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.2-node -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.3-swoole-nginx-prod/supervisor.conf b/8.3-swoole-nginx-prod/supervisor.conf index 312fe84..1737e28 100644 --- a/8.3-swoole-nginx-prod/supervisor.conf +++ b/8.3-swoole-nginx-prod/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole +command = su-exec kool php artisan octane:start +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.3-swoole-nginx/supervisor.conf b/8.3-swoole-nginx/supervisor.conf index b5cdc25..ac7aa23 100644 --- a/8.3-swoole-nginx/supervisor.conf +++ b/8.3-swoole-nginx/supervisor.conf @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole --watch +command = su-exec kool php artisan octane:start --watch +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout diff --git a/8.3-swoole-prod/Dockerfile b/8.3-swoole-prod/Dockerfile index 3f1f9a7..7c5a7cf 100644 --- a/8.3-swoole-prod/Dockerfile +++ b/8.3-swoole-prod/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.3-prod -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/8.3-swoole/Dockerfile b/8.3-swoole/Dockerfile index 7b5060e..e2ddbb8 100644 --- a/8.3-swoole/Dockerfile +++ b/8.3-swoole/Dockerfile @@ -1,8 +1,5 @@ FROM kooldev/php:8.3-node -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/template/Dockerfile.blade.php b/template/Dockerfile.blade.php index a0f786b..c20f1d8 100644 --- a/template/Dockerfile.blade.php +++ b/template/Dockerfile.blade.php @@ -1,8 +1,5 @@ FROM {{ $from }} -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \ - pecl install swoole && \ - docker-php-ext-enable swoole && \ - # cleanup - apk del .build-deps && \ - rm -rf /var/cache/apk/* /tmp/* +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions swoole diff --git a/template/supervisor-conf.blade.php b/template/supervisor-conf.blade.php index dc14f5d..e8d1784 100644 --- a/template/supervisor-conf.blade.php +++ b/template/supervisor-conf.blade.php @@ -1,12 +1,14 @@ [program:nginx] depends_on = octane command = nginx -g "daemon off;" +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout [program:octane] -command = su-exec kool php artisan octane:start --server=swoole{!! $prod ? '' : ' --watch' !!} +command = su-exec kool php artisan octane:start{!! $prod ? '' : ' --watch' !!} +autorestart = true stopasgroup = true stderr_logfile = /dev/stderr stdout_logfile = /dev/stdout