Skip to content

Commit e1afe0f

Browse files
committed
docker: simplify Laravel queue and scheduler run scripts
1 parent 0ba3bb1 commit e1afe0f

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SIGQUIT
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/command/with-contenv bash
1+
#!/bin/sh
22

33
# Change to the application directory
44
cd /var/www/html
55

66
# Run the Laravel queue worker
7-
exec s6-setuidgid www-data php artisan queue:work --verbose --sleep=5 --tries=3
7+
php artisan queue:work --sleep=5 --tries=3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SIGQUIT
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
#!/command/with-contenv bash
1+
#!/bin/sh
22

33
# Change to the application directory
44
cd /var/www/html
55

6-
# Handle shutdown gracefully
7-
shutdown() {
8-
echo "Received shutdown signal, exiting..."
9-
exit 0
10-
}
11-
12-
trap shutdown SIGTERM SIGINT
13-
146
# Run the Laravel scheduler every minute
15-
while true; do
16-
s6-setuidgid www-data php artisan schedule:run --verbose --no-interaction
17-
sleep 60 &
18-
wait $!
19-
done
7+
php artisan schedule:work

0 commit comments

Comments
 (0)