Skip to content

Commit af662a0

Browse files
committed
Add autorestart to Supervisor config
1 parent dccdce3 commit af662a0

File tree

18 files changed

+117
-63
lines changed

18 files changed

+117
-63
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[program:nginx]
22
depends_on = octane
33
command = nginx -g "daemon off;"
4+
autorestart = true
45
stopasgroup = true
56
stderr_logfile = /dev/stderr
67
stdout_logfile = /dev/stdout
78

89
[program:octane]
9-
command = su-exec kool php artisan octane:start --server=swoole
10+
command = su-exec kool php artisan octane:start
11+
autorestart = true
1012
stopasgroup = true
1113
stderr_logfile = /dev/stderr
1214
stdout_logfile = /dev/stdout

8.0-swoole-nginx/supervisor.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[program:nginx]
22
depends_on = octane
33
command = nginx -g "daemon off;"
4+
autorestart = true
45
stopasgroup = true
56
stderr_logfile = /dev/stderr
67
stdout_logfile = /dev/stdout
78

89
[program:octane]
9-
command = su-exec kool php artisan octane:start --server=swoole --watch
10+
command = su-exec kool php artisan octane:start --watch
11+
autorestart = true
1012
stopasgroup = true
1113
stderr_logfile = /dev/stderr
1214
stdout_logfile = /dev/stdout

8.0-swoole-prod/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
FROM kooldev/php:8.0-prod
22

3-
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
4-
pecl install swoole && \
5-
docker-php-ext-enable swoole && \
6-
# cleanup
7-
apk del .build-deps && \
8-
rm -rf /var/cache/apk/* /tmp/*
3+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
4+
5+
RUN install-php-extensions swoole
6+
7+
# RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
8+
# pecl install swoole && \
9+
# docker-php-ext-enable swoole && \
10+
# # cleanup
11+
# apk del .build-deps && \
12+
# rm -rf /var/cache/apk/* /tmp/*

8.0-swoole/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
FROM kooldev/php:8.0-node
22

3-
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
4-
pecl install swoole && \
5-
docker-php-ext-enable swoole && \
6-
# cleanup
7-
apk del .build-deps && \
8-
rm -rf /var/cache/apk/* /tmp/*
3+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
4+
5+
RUN install-php-extensions swoole
6+
7+
# RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
8+
# pecl install swoole && \
9+
# docker-php-ext-enable swoole && \
10+
# # cleanup
11+
# apk del .build-deps && \
12+
# rm -rf /var/cache/apk/* /tmp/*
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[program:nginx]
22
depends_on = octane
33
command = nginx -g "daemon off;"
4+
autorestart = true
45
stopasgroup = true
56
stderr_logfile = /dev/stderr
67
stdout_logfile = /dev/stdout
78

89
[program:octane]
9-
command = su-exec kool php artisan octane:start --server=swoole
10+
command = su-exec kool php artisan octane:start
11+
autorestart = true
1012
stopasgroup = true
1113
stderr_logfile = /dev/stderr
1214
stdout_logfile = /dev/stdout

8.1-swoole-nginx/supervisor.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[program:nginx]
22
depends_on = octane
33
command = nginx -g "daemon off;"
4+
autorestart = true
45
stopasgroup = true
56
stderr_logfile = /dev/stderr
67
stdout_logfile = /dev/stdout
78

89
[program:octane]
9-
command = su-exec kool php artisan octane:start --server=swoole --watch
10+
command = su-exec kool php artisan octane:start --watch
11+
autorestart = true
1012
stopasgroup = true
1113
stderr_logfile = /dev/stderr
1214
stdout_logfile = /dev/stdout

8.1-swoole-prod/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
FROM kooldev/php:8.1-prod
22

3-
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
4-
pecl install swoole && \
5-
docker-php-ext-enable swoole && \
6-
# cleanup
7-
apk del .build-deps && \
8-
rm -rf /var/cache/apk/* /tmp/*
3+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
4+
5+
RUN install-php-extensions swoole
6+
7+
# RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
8+
# pecl install swoole && \
9+
# docker-php-ext-enable swoole && \
10+
# # cleanup
11+
# apk del .build-deps && \
12+
# rm -rf /var/cache/apk/* /tmp/*

8.1-swoole/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
FROM kooldev/php:8.1-node
22

3-
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
4-
pecl install swoole && \
5-
docker-php-ext-enable swoole && \
6-
# cleanup
7-
apk del .build-deps && \
8-
rm -rf /var/cache/apk/* /tmp/*
3+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
4+
5+
RUN install-php-extensions swoole
6+
7+
# RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
8+
# pecl install swoole && \
9+
# docker-php-ext-enable swoole && \
10+
# # cleanup
11+
# apk del .build-deps && \
12+
# rm -rf /var/cache/apk/* /tmp/*
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[program:nginx]
22
depends_on = octane
33
command = nginx -g "daemon off;"
4+
autorestart = true
45
stopasgroup = true
56
stderr_logfile = /dev/stderr
67
stdout_logfile = /dev/stdout
78

89
[program:octane]
9-
command = su-exec kool php artisan octane:start --server=swoole
10+
command = su-exec kool php artisan octane:start
11+
autorestart = true
1012
stopasgroup = true
1113
stderr_logfile = /dev/stderr
1214
stdout_logfile = /dev/stdout

8.2-swoole-nginx/supervisor.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[program:nginx]
22
depends_on = octane
33
command = nginx -g "daemon off;"
4+
autorestart = true
45
stopasgroup = true
56
stderr_logfile = /dev/stderr
67
stdout_logfile = /dev/stdout
78

89
[program:octane]
9-
command = su-exec kool php artisan octane:start --server=swoole --watch
10+
command = su-exec kool php artisan octane:start --watch
11+
autorestart = true
1012
stopasgroup = true
1113
stderr_logfile = /dev/stderr
1214
stdout_logfile = /dev/stdout

0 commit comments

Comments
 (0)