File tree Expand file tree Collapse file tree 13 files changed +47
-0
lines changed
Expand file tree Collapse file tree 13 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,17 @@ ENV COMPOSER_NO_INTERACTION=1
4141# App defaults
4242ENV LOG_CHANNEL=stderr
4343
44+ # Schedule settings
45+ ENV SCHEDULE_ENABLED=true
46+
47+ # Queue settings
48+ ENV QUEUE_ENABLED=false
49+ ENV QUEUE_MAX_JOBS=50
50+ ENV QUEUE_SLEEP=30
51+ ENV QUEUE_REST=1
52+ ENV QUEUE_TIMEOUT=600
53+ ENV QUEUE_TRIES=3
54+
4455# Switch to root so we can do root things
4556USER root
4657
Original file line number Diff line number Diff line change 1+ healthcheck-queue
Original file line number Diff line number Diff line change 1+ php-fpm
Original file line number Diff line number Diff line change 1+ SIGTERM
Original file line number Diff line number Diff line change 1+ #!/command/with-contenv sh
2+
3+ echo "QUEUE_ENABLED $QUEUE_ENABLED"
4+
5+ if test "$QUEUE_ENABLED" -eq "true"; then
6+ artisan queue:work \
7+ --max-jobs $QUEUE_MAX_JOBS \
8+ --sleep $QUEUE_SLEEP \
9+ --rest $QUEUE_REST \
10+ --timeout $QUEUE_TIMEOUT \
11+ --tries $QUEUE_TRIES \
12+ --force
13+ else
14+ echo "Queue is disabled"
15+ s6-svc -Od .
16+ exit 0
17+ fi
Original file line number Diff line number Diff line change 1+ longrun
Original file line number Diff line number Diff line change 1+ healthcheck-schedule
Original file line number Diff line number Diff line change 1+ php-fpm
Original file line number Diff line number Diff line change 1+ SIGTERM
Original file line number Diff line number Diff line change 1+ #!/command/with-contenv sh
2+
3+ echo "SCHEDULE_ENABLED $SCHEDULE_ENABLED"
4+
5+ if test "$SCHEDULE_ENABLED" -eq "true"; then
6+ artisan schedule:work --whisper
7+ else
8+ echo "Schedule is disabled"
9+ s6-svc -Od .
10+ exit 0
11+ fi
You can’t perform that action at this time.
0 commit comments