mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
PHRAS-3463 add option for launching Phraseanet workers with supervisor
This commit is contained in:
12
.env
12
.env
@@ -149,7 +149,19 @@ PHRASEANET_SMTP_USER=
|
||||
PHRASEANET_SMTP_PASSWORD=
|
||||
|
||||
# Phraseanet Workers setting
|
||||
|
||||
# PHRASEANET_EXPLODE_WORKER define how many process are launched in the "worker" container
|
||||
# "0" only one process is launch inside the container with no specializing,
|
||||
# in this case the scaling need to be made by the orchestation eg K8S. this is the recomended way.
|
||||
# "1" deploy one phraseanet worker for each kind of job, the parallelime is set by env start by PHRASEANET_WORKER_
|
||||
# eg : PHRASEANET_WORKER_subdefCreation=2, for two subdefinition builded in same time.
|
||||
# PHRASEANET_WORKERS_LAUNCH_METHOD define when PHRASEANET_EXPLODE_WORKER=1, the method for launching Phraseanet workers process.
|
||||
# PHRASEANET_WORKERS_LAUNCH_METHOD="supervisor" : for launch it with supervisor.
|
||||
# PHRASEANET_WORKERS_LAUNCH_METHOD= : for launch phraseanet workers with a "bin/console"
|
||||
|
||||
PHRASEANET_EXPLODE_WORKER=1
|
||||
PHRASEANET_WORKERS_LAUNCH_METHOD=
|
||||
|
||||
PHRASEANET_WORKER_assetsIngest=1
|
||||
PHRASEANET_WORKER_createRecord=2
|
||||
PHRASEANET_WORKER_deleteRecord=2
|
||||
|
10
Dockerfile
10
Dockerfile
@@ -225,6 +225,16 @@ CMD ["php-fpm", "-F"]
|
||||
#########################################################################
|
||||
|
||||
FROM phraseanet-fpm as phraseanet-worker
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
supervisor \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& chown -R app: /var/log/supervisor \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
|
||||
COPY ./docker/phraseanet/worker/supervisor.conf /etc/supervisor/
|
||||
|
||||
ENTRYPOINT ["docker/phraseanet/worker/entrypoint.sh"]
|
||||
CMD ["/bin/bash", "bin/run-worker.sh"]
|
||||
|
||||
|
@@ -152,7 +152,8 @@ services:
|
||||
- LC_CTYPE=C.UTF-8
|
||||
- LC_TIME=C.UTF-8
|
||||
- LC_NAME=C.UTF-8
|
||||
- PHRASEANET_EXPLODE_WORKER
|
||||
- PHRASEANET_EXPLODE_WORKER
|
||||
- PHRASEANET_WORKERS_LAUNCH_METHOD
|
||||
- PHRASEANET_WORKER_assetsIngest
|
||||
- PHRASEANET_WORKER_createRecord
|
||||
- PHRASEANET_WORKER_deleteRecord
|
||||
|
@@ -3,6 +3,7 @@
|
||||
set -e
|
||||
|
||||
DOCKER_DIR="./docker/phraseanet"
|
||||
PHR_USER=app
|
||||
|
||||
mkdir -p "${APP_DIR}/tmp/locks" \
|
||||
&& chown -R app:app "${APP_DIR}/tmp"
|
||||
@@ -59,7 +60,30 @@ fi
|
||||
|
||||
rm -rf bin/run-worker.sh
|
||||
if [ ! -z "$PHRASEANET_EXPLODE_WORKER" ] && [ ${PHRASEANET_EXPLODE_WORKER} == "1" ]; then
|
||||
for i in `env | grep PHRASEANET_WORKER_ | cut -d'=' -f1`
|
||||
if [ ! -z "$PHRASEANET_WORKERS_LAUNCH_METHOD" ] && [ ${PHRASEANET_WORKERS_LAUNCH_METHOD} == "supervisor" ]; then
|
||||
for i in `env | grep PHRASEANET_WORKER_`
|
||||
do
|
||||
wcount=0
|
||||
worker_env_name="$(echo $i | cut -d'=' -f1)"
|
||||
worker_parallelism="$(echo $i | cut -d'=' -f2)"
|
||||
worker_job_file="$(echo $worker_env_name | cut -d'_' -f3).conf"
|
||||
# echo "Worker job file: " $worker_job_file " -- worker_parallelism: " $worker_parallelism " -- from env var: " $worker_env_name
|
||||
if [ $worker_parallelism -gt "0" ] ; then
|
||||
envsubst < "/var/alchemy/Phraseanet/docker/phraseanet/worker/supervisor_conf.d/$worker_job_file" > /etc/supervisor/conf.d/$worker_job_file
|
||||
echo "set Worker : " $worker_job_file " -- with parallelism: " $worker_parallelism
|
||||
# ((wcount++))
|
||||
wcount=$(( wcount+1 ))
|
||||
else
|
||||
echo "NO Worker define for : " $worker_job_file " -- because parallelism is set to : " $worker_parallelism
|
||||
fi
|
||||
done
|
||||
command="/usr/bin/supervisord -n -c /etc/supervisor/supervisor.conf"
|
||||
echo $command >> bin/run-worker.sh
|
||||
PHR_USER=root
|
||||
echo "$wcount Phraseanet workers will be launched by supervisor"
|
||||
|
||||
else
|
||||
for i in `env | grep PHRASEANET_WORKER_ | cut -d'=' -f1`
|
||||
do
|
||||
queue_name="$(echo $i | cut -d'_' -f3)"
|
||||
m=$i
|
||||
@@ -81,9 +105,10 @@ if [ ! -z "$PHRASEANET_EXPLODE_WORKER" ] && [ ${PHRASEANET_EXPLODE_WORKER} == "1
|
||||
break
|
||||
fi
|
||||
done ' >> bin/run-worker.sh
|
||||
fi
|
||||
else
|
||||
command="bin/console worker:execute"
|
||||
echo $command >> bin/run-worker.sh
|
||||
fi
|
||||
|
||||
runuser -u app -- $@
|
||||
runuser -u $PHR_USER -- $@
|
||||
|
31
docker/phraseanet/worker/supervisor.conf
Normal file
31
docker/phraseanet/worker/supervisor.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
; supervisor config file
|
||||
|
||||
[unix_http_server]
|
||||
file=/var/run/supervisor.sock ; (the path to the socket file)
|
||||
file = /var/run/supervisor.sock
|
||||
chmod = 770
|
||||
chown = root:app
|
||||
|
||||
[supervisord]
|
||||
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
|
||||
pidfile=/home/app/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
||||
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
|
||||
|
||||
; the below section must remain in the config file for RPC
|
||||
; (supervisorctl/web interface) to work, additional interfaces may be
|
||||
; added by defining them in separate rpcinterface: sections
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
|
||||
|
||||
; The [include] section can just contain the "files" setting. This
|
||||
; setting can list multiple files (separated by whitespace or
|
||||
; newlines). It can also contain wildcards. The filenames are
|
||||
; interpreted as relative to this file. Included files *cannot*
|
||||
; include files themselves.
|
||||
|
||||
[include]
|
||||
files = /etc/supervisor/conf.d/*.conf
|
||||
|
29
docker/phraseanet/worker/supervisor_conf.d/assetsIngest.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/assetsIngest.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-assetsIngest]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=assetsIngest -m $PHRASEANET_WORKER_assetsIngest ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
||||
|
29
docker/phraseanet/worker/supervisor_conf.d/createRecord.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/createRecord.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-createRecord]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=createRecord -m $PHRASEANET_WORKER_createRecord ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
||||
|
29
docker/phraseanet/worker/supervisor_conf.d/deleteRecord.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/deleteRecord.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-deleteRecord]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=deleteRecord -m $PHRASEANET_WORKER_deleteRecord ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
||||
|
29
docker/phraseanet/worker/supervisor_conf.d/editRecord.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/editRecord.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-editRecord]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=editRecord -m $PHRASEANET_WORKER_editRecord ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
||||
|
28
docker/phraseanet/worker/supervisor_conf.d/exportMail.conf
Normal file
28
docker/phraseanet/worker/supervisor_conf.d/exportMail.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
[program:w-export]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=exportMail -m $PHRASEANET_WORKER_exportMail ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
28
docker/phraseanet/worker/supervisor_conf.d/exposeUpload.conf
Normal file
28
docker/phraseanet/worker/supervisor_conf.d/exposeUpload.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
[program:w-exposeUpload]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=exposeUpload -m $PHRASEANET_WORKER_exposeUpload ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
29
docker/phraseanet/worker/supervisor_conf.d/ftp.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/ftp.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-ftp]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=ftp -m $PHRASEANET_WORKER_ftp ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
||||
|
@@ -0,0 +1,2 @@
|
||||
[group:Workers]
|
||||
programs=w-createRecord, w-writeMetadatas, w-subdefCreation, w-assetsIngest, w-webhook, w-export, w-populateDb, w-deleteRecord, w-editRecord, w-mainQueue, w-ftp, w-pullAssets, w-subtitle, w-validationReminder, w-exposeUpload
|
28
docker/phraseanet/worker/supervisor_conf.d/mainQueue.conf
Normal file
28
docker/phraseanet/worker/supervisor_conf.d/mainQueue.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
[program:w-mainQueue]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=mainQueue -m $PHRASEANET_WORKER_mainQueue ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=www-data ; process environment additions (def no adds)
|
@@ -0,0 +1,28 @@
|
||||
[program:w-populateDb]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=populateIndex -m $PHRASEANET_WORKER_populateIndex ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
29
docker/phraseanet/worker/supervisor_conf.d/pullAssets.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/pullAssets.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-pullAssets]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=pullAssets -m $PHRASEANET_WORKER_pullAssets ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
||||
|
@@ -0,0 +1,28 @@
|
||||
[program:w-subdefCreation]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=subdefCreation -m $PHRASEANET_WORKER_subdefCreation ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
29
docker/phraseanet/worker/supervisor_conf.d/subtitle.conf
Normal file
29
docker/phraseanet/worker/supervisor_conf.d/subtitle.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
[program:w-subtitle]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=subtitle -m $PHRASEANET_WORKER_subtitle ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
||||
|
@@ -0,0 +1,29 @@
|
||||
[program:w-validationReminder]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=validationReminder -m $PHRASEANET_WORKER_validationReminder ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
||||
|
28
docker/phraseanet/worker/supervisor_conf.d/webhook.conf
Normal file
28
docker/phraseanet/worker/supervisor_conf.d/webhook.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
[program:w-webhook]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=webhook -m $PHRASEANET_WORKER_webhook ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/var/www,USER=app ; process environment additions (def no adds)
|
@@ -0,0 +1,28 @@
|
||||
[program:w-writeMetadatas]
|
||||
command=nice -n 15 /usr/local/bin/php /var/alchemy/Phraseanet/bin/console worker:execute --queue-name=writeMetadatas -m $PHRASEANET_WORKER_writeMetadatas ; the program (relative uses PATH, can take args)
|
||||
stdout_logfile=AUTO ; stdout log path, NONE for none; default AUTO
|
||||
stderr_logfile=AUTO ; stderr log path, NONE for none; default AUTO
|
||||
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
numprocs=1 ; number of processes copies to start (def 1)
|
||||
directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
priority=999 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
startsecs=0 ; number of secs prog must stay running (def. 1)
|
||||
startretries=3 ; max # of serial start failures (default 3)
|
||||
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
|
||||
stopsignal=INT ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
stopasgroup=true ; send stop signal to the UNIX process group (default false)
|
||||
killasgroup=true ; SIGKILL the UNIX process group (def false)
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
user=1000 ; setuid to this UNIX account to run the program
|
||||
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
|
||||
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
|
||||
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
environment=HOME=/home/app,USER=app ; process environment additions (def no adds)
|
Reference in New Issue
Block a user