Skip to content

Commit c347c65

Browse files
committed
#37 feat: add config files for worker
1 parent 68e5aed commit c347c65

File tree

2 files changed

+182
-0
lines changed

2 files changed

+182
-0
lines changed

worker/blog.php.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
date.timezone=Asia/Ho_Chi_Minh
2+
display_errors=Off
3+
log_errors=On
4+
5+
memory_limit = 256M
6+
upload_max_filesize = 20M
7+
post_max_size = 20M
8+
max_execution_time=600
9+
default_socket_timeout=3600
10+
request_terminate_timeout=600

worker/supervisord.conf

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
; Sample supervisor config file.
2+
;
3+
; For more information on the config file, please see:
4+
; http://supervisord.org/configuration.html
5+
;
6+
; Notes:
7+
; - Shell expansion ("~" or "$HOME") is not supported. Environment
8+
; variables can be expanded using this syntax: "%(ENV_HOME)s".
9+
; - Quotes around values are not supported, except in the case of
10+
; the environment= options as shown below.
11+
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
12+
; - Command will be truncated if it looks like a config file comment, e.g.
13+
; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
14+
;
15+
; Warning:
16+
; Paths throughout this example file use /tmp because it is available on most
17+
; systems. You will likely need to change these to locations more appropriate
18+
; for your system. Some systems periodically delete older files in /tmp.
19+
; Notably, if the socket file defined in the [unix_http_server] section below
20+
; is deleted, supervisorctl will be unable to connect to supervisord.
21+
22+
[unix_http_server]
23+
file=/run/supervisord.sock ; the path to the socket file
24+
;chmod=0700 ; socket file mode (default 0700)
25+
;chown=nobody:nogroup ; socket file uid:gid owner
26+
;username=user ; default is no username (open server)
27+
;password=123 ; default is no password (open server)
28+
29+
; Security Warning:
30+
; The inet HTTP server is not enabled by default. The inet HTTP server is
31+
; enabled by uncommenting the [inet_http_server] section below. The inet
32+
; HTTP server is intended for use within a trusted environment only. It
33+
; should only be bound to localhost or only accessible from within an
34+
; isolated, trusted network. The inet HTTP server does not support any
35+
; form of encryption. The inet HTTP server does not use authentication
36+
; by default (see the username= and password= options to add authentication).
37+
; Never expose the inet HTTP server to the public internet.
38+
39+
;[inet_http_server] ; inet (TCP) server disabled by default
40+
;port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface
41+
;username=user ; default is no username (open server)
42+
;password=123 ; default is no password (open server)
43+
44+
[supervisord]
45+
logfile=/var/log/supervisord.log ; main log file; default $CWD/supervisord.log
46+
;logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB
47+
;logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
48+
;loglevel=info ; log level; default info; others: debug,warn,trace
49+
pidfile=/run/supervisord.pid ; supervisord pidfile; default supervisord.pid
50+
;nodaemon=false ; start in foreground if true; default false
51+
;silent=false ; no logs to stdout if true; default false
52+
;minfds=1024 ; min. avail startup file descriptors; default 1024
53+
;minprocs=200 ; min. avail process descriptors;default 200
54+
;umask=022 ; process file creation umask; default 022
55+
;user=chrism ; setuid to this UNIX account at startup; recommended if root
56+
;identifier=supervisor ; supervisord identifier, default is 'supervisor'
57+
;directory=/tmp ; default is not to cd during start
58+
;nocleanup=true ; don't clean up tempfiles at start; default false
59+
;childlogdir=/var/log/supervisor ; 'AUTO' child log dir, default $TEMP
60+
;environment=KEY="value" ; key value pairs to add to environment
61+
;strip_ansi=false ; strip ansi escape codes in logs; def. false
62+
63+
; The rpcinterface:supervisor section must remain in the config file for
64+
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
65+
; added by defining them in separate [rpcinterface:x] sections.
66+
67+
[rpcinterface:supervisor]
68+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
69+
70+
; The supervisorctl section configures how supervisorctl will connect to
71+
; supervisord. configure it match the settings in either the unix_http_server
72+
; or inet_http_server section.
73+
74+
[supervisorctl]
75+
serverurl=unix:///run/supervisord.sock ; use a unix:// URL for a unix socket
76+
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
77+
;username=chris ; should be same as in [*_http_server] if set
78+
;password=123 ; should be same as in [*_http_server] if set
79+
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
80+
;history_file=~/.sc_history ; use readline history if available
81+
82+
; The sample program section below shows all possible program subsection values.
83+
; Create one or more 'real' program: sections to be able to control them under
84+
; supervisor.
85+
86+
;[program:theprogramname]
87+
;command=/bin/cat ; the program (relative uses PATH, can take args)
88+
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
89+
;numprocs=1 ; number of processes copies to start (def 1)
90+
;directory=/tmp ; directory to cwd to before exec (def no cwd)
91+
;umask=022 ; umask for process (default None)
92+
;priority=999 ; the relative start priority (default 999)
93+
;autostart=true ; start at supervisord start (default: true)
94+
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
95+
;startretries=3 ; max # of serial start failures when starting (default 3)
96+
;autorestart=unexpected ; when to restart if exited after running (def: unexpected)
97+
;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
98+
;stopsignal=QUIT ; signal used to kill process (default TERM)
99+
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
100+
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
101+
;killasgroup=false ; SIGKILL the UNIX process group (def false)
102+
;user=chrism ; setuid to this UNIX account to run the program
103+
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
104+
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
105+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
106+
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
107+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
108+
;stdout_events_enabled=false ; emit events on stdout writes (default false)
109+
;stdout_syslog=false ; send stdout to syslog with process name (default false)
110+
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
111+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
112+
;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
113+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
114+
;stderr_events_enabled=false ; emit events on stderr writes (default false)
115+
;stderr_syslog=false ; send stderr to syslog with process name (default false)
116+
;environment=A="1",B="2" ; process environment additions (def no adds)
117+
;serverurl=AUTO ; override serverurl computation (childutils)
118+
119+
; The sample eventlistener section below shows all possible eventlistener
120+
; subsection values. Create one or more 'real' eventlistener: sections to be
121+
; able to handle event notifications sent by supervisord.
122+
123+
;[eventlistener:theeventlistenername]
124+
;command=/bin/eventlistener ; the program (relative uses PATH, can take args)
125+
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
126+
;numprocs=1 ; number of processes copies to start (def 1)
127+
;events=EVENT ; event notif. types to subscribe to (req'd)
128+
;buffer_size=10 ; event buffer queue size (default 10)
129+
;directory=/tmp ; directory to cwd to before exec (def no cwd)
130+
;umask=022 ; umask for process (default None)
131+
;priority=-1 ; the relative start priority (default -1)
132+
;autostart=true ; start at supervisord start (default: true)
133+
;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
134+
;startretries=3 ; max # of serial start failures when starting (default 3)
135+
;autorestart=unexpected ; autorestart if exited after running (def: unexpected)
136+
;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
137+
;stopsignal=QUIT ; signal used to kill process (default TERM)
138+
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
139+
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
140+
;killasgroup=false ; SIGKILL the UNIX process group (def false)
141+
;user=chrism ; setuid to this UNIX account to run the program
142+
;redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners
143+
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
144+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
145+
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
146+
;stdout_events_enabled=false ; emit events on stdout writes (default false)
147+
;stdout_syslog=false ; send stdout to syslog with process name (default false)
148+
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
149+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
150+
;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
151+
;stderr_events_enabled=false ; emit events on stderr writes (default false)
152+
;stderr_syslog=false ; send stderr to syslog with process name (default false)
153+
;environment=A="1",B="2" ; process environment additions
154+
;serverurl=AUTO ; override serverurl computation (childutils)
155+
156+
; The sample group section below shows all possible group values. Create one
157+
; or more 'real' group: sections to create "heterogeneous" process groups.
158+
159+
;[group:thegroupname]
160+
;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
161+
;priority=999 ; the relative start priority (default 999)
162+
163+
; The [include] section can just contain the "files" setting. This
164+
; setting can list multiple files (separated by whitespace or
165+
; newlines). It can also contain wildcards. The filenames are
166+
; interpreted as relative to this file. Included files *cannot*
167+
; include files themselves.
168+
169+
[include]
170+
files = /etc/supervisor.d/*.conf
171+
172+
; CSlant custom configuration

0 commit comments

Comments
 (0)