further rework to the documentation
This commit is contained in:
11
scripts/horizon.sh
Normal file
11
scripts/horizon.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Horizon entrypoint for Docker containers.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "${APP_PATH:-/var/www/html}"
|
||||
|
||||
echo "[horizon] Booting Horizon..."
|
||||
exec php artisan horizon
|
||||
|
||||
27
scripts/queue-worker.sh
Normal file
27
scripts/queue-worker.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Generic queue worker entrypoint for Docker containers.
|
||||
# Usage: queue-worker.sh [queue-name(s)]
|
||||
# Example: queue-worker.sh default
|
||||
# queue-worker.sh default,media-storage
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "${APP_PATH:-/var/www/html}"
|
||||
|
||||
CONNECTION="${QUEUE_CONNECTION:-redis}"
|
||||
QUEUES="${1:-default}"
|
||||
SLEEP="${QUEUE_SLEEP:-3}"
|
||||
TRIES="${QUEUE_TRIES:-3}"
|
||||
TIMEOUT="${QUEUE_TIMEOUT:-60}"
|
||||
MAX_TIME="${QUEUE_MAX_TIME:-0}"
|
||||
|
||||
ARGS=("$CONNECTION" "--queue=${QUEUES}" "--sleep=${SLEEP}" "--tries=${TRIES}" "--timeout=${TIMEOUT}")
|
||||
|
||||
if [[ "${MAX_TIME}" != "0" ]]; then
|
||||
ARGS+=("--max-time=${MAX_TIME}")
|
||||
fi
|
||||
|
||||
echo "[queue-worker] Starting queue:work ${ARGS[*]}"
|
||||
exec php artisan queue:work "${ARGS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user