Run a queue worker under Sail

MarkBookingPaid/MarkBookingRefunded (and anything else ShouldQueue) had
nothing consuming the jobs table locally — no queue service existed in
compose.yaml, so a booking's status only flipped once someone happened to
run `sail artisan queue:work` by hand. Refund actions in Filament looked
like they hadn't taken effect until that ran.
This commit is contained in:
Nyan Lin Paing
2026-09-03 11:46:17 +07:00
parent adabb2c690
commit b5b4fe06e6
+21
View File
@@ -24,6 +24,27 @@ services:
depends_on: depends_on:
- pgsql - pgsql
- redis - redis
laravel.queue:
build:
context: './vendor/laravel/sail/runtimes/8.5'
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: 'sail-8.5/app'
# Nothing was processing MarkBookingPaid/MarkBookingRefunded — a
# confirmed/cancelled booking's status only ever flipped once
# someone happened to run `sail artisan queue:work` by hand.
command: php artisan queue:work --tries=3 --sleep=1
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
volumes:
- '.:/var/www/html'
networks:
- sail
depends_on:
- pgsql
- redis
pgsql: pgsql:
image: 'postgres:18-alpine' image: 'postgres:18-alpine'
ports: ports: