mirror of https://github.com/MISP/MISP
add: env variable to disable background workers
parent
aff770249b
commit
1151d4779b
|
@ -18,6 +18,7 @@ services:
|
|||
ADMIN_INITIAL_PASSWORD: ${ADMIN_INITIAL_PASSWORD}
|
||||
ADMIN_USER_API_KEY: ${ADMIN_USER_API_KEY}
|
||||
GPG_PASSPHRASE: ${GPG_PASSPHRASE}
|
||||
DISABLE_BACKGROUND_WORKERS: ${DISABLE_BACKGROUND_WORKERS:-0}
|
||||
NUM_WORKERS_DEFAULT: ${NUM_WORKERS_DEFAULT:-5}
|
||||
NUM_WORKERS_PRIO: ${NUM_WORKERS_PRIO:-5}
|
||||
NUM_WORKERS_EMAIL: ${NUM_WORKERS_EMAIL:-5}
|
||||
|
|
|
@ -97,14 +97,22 @@ php-fpm -t
|
|||
# Finished bootstrapping, create ready flag file
|
||||
touch "${MISP_READY_STATUS_FLAG}"
|
||||
|
||||
# Start Supervisor
|
||||
echo >&2 "Starting Supervisor..."
|
||||
supervisord -n -c /etc/supervisor/conf.d/supervisor.conf &
|
||||
sleep 5
|
||||
if [ -z "$DISABLE_BACKGROUND_WORKERS" ]; then
|
||||
DISABLE_BACKGROUND_WORKERS=0
|
||||
fi
|
||||
|
||||
# # Start workers
|
||||
# echo >&2 "Starting workers..."
|
||||
# supervisorctl start misp-workers:*
|
||||
if [ "$DISABLE_BACKGROUND_WORKERS" -eq 1 ]; then
|
||||
echo >&2 "Background workers disabled, skipping..."
|
||||
else
|
||||
# Start Supervisor
|
||||
echo >&2 "Starting Supervisor..."
|
||||
supervisord -n -c /etc/supervisor/conf.d/supervisor.conf &
|
||||
sleep 5
|
||||
|
||||
# Start workers
|
||||
echo >&2 "Starting workers..."
|
||||
supervisorctl start misp-workers:*
|
||||
fi
|
||||
|
||||
echo >&2 "Starting php-fpm..."
|
||||
exec php-fpm -F "$@"
|
||||
|
|
Loading…
Reference in New Issue