Skip to content

Commit 37508bb

Browse files
cjmaxikphiltrep
authored andcommitted
Add Queue Worker as a starting point (laradock#581)
* Add Queue Worker as an starting point By laradock#14 (comment) * Fix typo
1 parent c3f5dfa commit 37508bb

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to
6565
- [Laravel](#Laravel):
6666
- [Install Laravel from a Docker Container](#Install-Laravel)
6767
- [Run Artisan Commands](#Run-Artisan-Commands)
68+
- [Run Laravel Queue Worker](#Run-Laravel-Queue-Worker)
6869
- [Use Redis](#Use-Redis)
6970
- [Use Mongo](#Use-Mongo)
7071
- [Use PhpMyAdmin](#Use-phpMyAdmin)
@@ -928,6 +929,31 @@ phpunit
928929
929930
930931
932+
<br>
933+
<a name="Run-Laravel-Queue-Worker"></a>
934+
### Run Laravel Queue Worker
935+
936+
1 - First add `php-worker` container. It will be similar as like PHP-FPM Containter.
937+
<br>
938+
a) open the `docker-compose.yml` file
939+
<br>
940+
b) add a new service container by simply copy-paste this section below PHP-FPM container
941+
942+
```yaml
943+
php-worker:
944+
build:
945+
context: ./php-fpm
946+
dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting
947+
volumes_from:
948+
- applications
949+
command: php artisan queue:work
950+
```
951+
2 - Start everything up
952+
953+
```bash
954+
docker-compose up -d php-worker
955+
```
956+
931957
<br>
932958
<a name="Use-Redis"></a>
933959
### Use Redis

0 commit comments

Comments
 (0)