Skip to content

Commit 63b8cde

Browse files
authored
Merge pull request #111 from kool-dev/supervisord
Adding Supervisord Header Config
2 parents 0fc540c + 581582e commit 63b8cde

File tree

19 files changed

+193
-76
lines changed

19 files changed

+193
-76
lines changed

.github/workflows/ci-cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on:
44
push:
55
workflow_dispatch:
66
schedule:
7-
- cron: '0 0 * * 0'
7+
- cron: "0 0 * * 0"
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

1313
strategy:
1414
matrix:
15-
version: ['8.1', '8.2', '8.3', '8.4']
16-
type: ['', '-prod']
15+
version: ["8.1", "8.2", "8.3", "8.4"]
16+
type: ["", "-prod"]
1717

1818
steps:
1919
- name: Checkout code
@@ -96,7 +96,7 @@ jobs:
9696
9797
docker run kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }} nginx -v
9898
docker run kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }} nginx -T
99-
docker run kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }} supervisord version
99+
docker run kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }} supervisord --version
100100
101101
- name: Build and push (nginx)
102102
uses: docker/build-push-action@v6

8.1-nginx-prod/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ENV PHP_FPM_LISTEN=/run/php-fpm.sock \
2929
NGINX_FASTCGI_BUFFER_SIZE='16k' \
3030
NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE=true
3131

32-
RUN curl -L https://github.com/ochinchina/supervisord/releases/download/v0.6.3/supervisord_static_0.6.3_linux_amd64 -o /usr/local/bin/supervisord \
33-
&& chmod +x /usr/local/bin/supervisord \
34-
&& apk add --no-cache nginx \
32+
RUN apk add --no-cache nginx supervisor \
3533
&& chown -R kool:kool /var/lib/nginx \
3634
&& chmod 770 /var/lib/nginx/tmp \
3735
&& ln -sf /dev/stdout /var/log/nginx/access.log \

8.1-nginx-prod/supervisor.conf

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
[program:nginx]
2-
depends_on = php-fpm
3-
command = nginx -g "daemon off;"
1+
[supervisord]
2+
logfile=/dev/stdout
3+
logfile_maxbytes=0
4+
pidfile=/run/supervisord.pid
5+
nodaemon=true
6+
7+
[program:php-fpm]
8+
command = php-fpm
9+
priority = 10
10+
autorestart = true
411
stopasgroup = true
12+
killasgroup = true
513
stderr_logfile = /dev/stderr
614
stdout_logfile = /dev/stdout
15+
stderr_logfile_maxbytes = 0
16+
stdout_logfile_maxbytes = 0
717

8-
[program:php-fpm]
9-
command = php-fpm
18+
[program:nginx]
19+
command = nginx -g "daemon off;"
20+
priority = 20
21+
autorestart = true
1022
stopasgroup = true
23+
killasgroup = true
1124
stderr_logfile = /dev/stderr
1225
stdout_logfile = /dev/stdout
26+
stderr_logfile_maxbytes = 0
27+
stdout_logfile_maxbytes = 0

8.1-nginx/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ENV PHP_FPM_LISTEN=/run/php-fpm.sock \
2929
NGINX_FASTCGI_BUFFER_SIZE='16k' \
3030
NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE=true
3131

32-
RUN curl -L https://github.com/ochinchina/supervisord/releases/download/v0.6.3/supervisord_static_0.6.3_linux_amd64 -o /usr/local/bin/supervisord \
33-
&& chmod +x /usr/local/bin/supervisord \
34-
&& apk add --no-cache nginx \
32+
RUN apk add --no-cache nginx supervisor \
3533
&& chown -R kool:kool /var/lib/nginx \
3634
&& chmod 770 /var/lib/nginx/tmp \
3735
&& ln -sf /dev/stdout /var/log/nginx/access.log \

8.1-nginx/supervisor.conf

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
[program:nginx]
2-
depends_on = php-fpm
3-
command = nginx -g "daemon off;"
1+
[supervisord]
2+
logfile=/dev/stdout
3+
logfile_maxbytes=0
4+
pidfile=/run/supervisord.pid
5+
nodaemon=true
6+
7+
[program:php-fpm]
8+
command = php-fpm
9+
priority = 10
10+
autorestart = true
411
stopasgroup = true
12+
killasgroup = true
513
stderr_logfile = /dev/stderr
614
stdout_logfile = /dev/stdout
15+
stderr_logfile_maxbytes = 0
16+
stdout_logfile_maxbytes = 0
717

8-
[program:php-fpm]
9-
command = php-fpm
18+
[program:nginx]
19+
command = nginx -g "daemon off;"
20+
priority = 20
21+
autorestart = true
1022
stopasgroup = true
23+
killasgroup = true
1124
stderr_logfile = /dev/stderr
1225
stdout_logfile = /dev/stdout
26+
stderr_logfile_maxbytes = 0
27+
stdout_logfile_maxbytes = 0

8.2-nginx-prod/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ENV PHP_FPM_LISTEN=/run/php-fpm.sock \
2929
NGINX_FASTCGI_BUFFER_SIZE='16k' \
3030
NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE=true
3131

32-
RUN curl -L https://github.com/ochinchina/supervisord/releases/download/v0.6.3/supervisord_static_0.6.3_linux_amd64 -o /usr/local/bin/supervisord \
33-
&& chmod +x /usr/local/bin/supervisord \
34-
&& apk add --no-cache nginx \
32+
RUN apk add --no-cache nginx supervisor \
3533
&& chown -R kool:kool /var/lib/nginx \
3634
&& chmod 770 /var/lib/nginx/tmp \
3735
&& ln -sf /dev/stdout /var/log/nginx/access.log \

8.2-nginx-prod/supervisor.conf

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
[program:nginx]
2-
depends_on = php-fpm
3-
command = nginx -g "daemon off;"
1+
[supervisord]
2+
logfile=/dev/stdout
3+
logfile_maxbytes=0
4+
pidfile=/run/supervisord.pid
5+
nodaemon=true
6+
7+
[program:php-fpm]
8+
command = php-fpm
9+
priority = 10
10+
autorestart = true
411
stopasgroup = true
12+
killasgroup = true
513
stderr_logfile = /dev/stderr
614
stdout_logfile = /dev/stdout
15+
stderr_logfile_maxbytes = 0
16+
stdout_logfile_maxbytes = 0
717

8-
[program:php-fpm]
9-
command = php-fpm
18+
[program:nginx]
19+
command = nginx -g "daemon off;"
20+
priority = 20
21+
autorestart = true
1022
stopasgroup = true
23+
killasgroup = true
1124
stderr_logfile = /dev/stderr
1225
stdout_logfile = /dev/stdout
26+
stderr_logfile_maxbytes = 0
27+
stdout_logfile_maxbytes = 0

8.2-nginx/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ENV PHP_FPM_LISTEN=/run/php-fpm.sock \
2929
NGINX_FASTCGI_BUFFER_SIZE='16k' \
3030
NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE=true
3131

32-
RUN curl -L https://github.com/ochinchina/supervisord/releases/download/v0.6.3/supervisord_static_0.6.3_linux_amd64 -o /usr/local/bin/supervisord \
33-
&& chmod +x /usr/local/bin/supervisord \
34-
&& apk add --no-cache nginx \
32+
RUN apk add --no-cache nginx supervisor \
3533
&& chown -R kool:kool /var/lib/nginx \
3634
&& chmod 770 /var/lib/nginx/tmp \
3735
&& ln -sf /dev/stdout /var/log/nginx/access.log \

8.2-nginx/supervisor.conf

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
[program:nginx]
2-
depends_on = php-fpm
3-
command = nginx -g "daemon off;"
1+
[supervisord]
2+
logfile=/dev/stdout
3+
logfile_maxbytes=0
4+
pidfile=/run/supervisord.pid
5+
nodaemon=true
6+
7+
[program:php-fpm]
8+
command = php-fpm
9+
priority = 10
10+
autorestart = true
411
stopasgroup = true
12+
killasgroup = true
513
stderr_logfile = /dev/stderr
614
stdout_logfile = /dev/stdout
15+
stderr_logfile_maxbytes = 0
16+
stdout_logfile_maxbytes = 0
717

8-
[program:php-fpm]
9-
command = php-fpm
18+
[program:nginx]
19+
command = nginx -g "daemon off;"
20+
priority = 20
21+
autorestart = true
1022
stopasgroup = true
23+
killasgroup = true
1124
stderr_logfile = /dev/stderr
1225
stdout_logfile = /dev/stdout
26+
stderr_logfile_maxbytes = 0
27+
stdout_logfile_maxbytes = 0

8.3-nginx-prod/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ ENV PHP_FPM_LISTEN=/run/php-fpm.sock \
2929
NGINX_FASTCGI_BUFFER_SIZE='16k' \
3030
NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE=true
3131

32-
RUN curl -L https://github.com/ochinchina/supervisord/releases/download/v0.6.3/supervisord_static_0.6.3_linux_amd64 -o /usr/local/bin/supervisord \
33-
&& chmod +x /usr/local/bin/supervisord \
34-
&& apk add --no-cache nginx \
32+
RUN apk add --no-cache nginx supervisor \
3533
&& chown -R kool:kool /var/lib/nginx \
3634
&& chmod 770 /var/lib/nginx/tmp \
3735
&& ln -sf /dev/stdout /var/log/nginx/access.log \

0 commit comments

Comments
 (0)