Add Queue Worker as a starting point (#581)
* Add Queue Worker as an starting point By https://github.com/laradock/laradock/issues/14#issuecomment-276374969 * Fix typo
This commit is contained in:
parent
c3f5dfa741
commit
37508bb3ca
26
README.md
26
README.md
|
@ -65,6 +65,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to
|
||||||
- [Laravel](#Laravel):
|
- [Laravel](#Laravel):
|
||||||
- [Install Laravel from a Docker Container](#Install-Laravel)
|
- [Install Laravel from a Docker Container](#Install-Laravel)
|
||||||
- [Run Artisan Commands](#Run-Artisan-Commands)
|
- [Run Artisan Commands](#Run-Artisan-Commands)
|
||||||
|
- [Run Laravel Queue Worker](#Run-Laravel-Queue-Worker)
|
||||||
- [Use Redis](#Use-Redis)
|
- [Use Redis](#Use-Redis)
|
||||||
- [Use Mongo](#Use-Mongo)
|
- [Use Mongo](#Use-Mongo)
|
||||||
- [Use PhpMyAdmin](#Use-phpMyAdmin)
|
- [Use PhpMyAdmin](#Use-phpMyAdmin)
|
||||||
|
@ -928,6 +929,31 @@ phpunit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Run-Laravel-Queue-Worker"></a>
|
||||||
|
### Run Laravel Queue Worker
|
||||||
|
|
||||||
|
1 - First add `php-worker` container. It will be similar as like PHP-FPM Containter.
|
||||||
|
<br>
|
||||||
|
a) open the `docker-compose.yml` file
|
||||||
|
<br>
|
||||||
|
b) add a new service container by simply copy-paste this section below PHP-FPM container
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
php-worker:
|
||||||
|
build:
|
||||||
|
context: ./php-fpm
|
||||||
|
dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting
|
||||||
|
volumes_from:
|
||||||
|
- applications
|
||||||
|
command: php artisan queue:work
|
||||||
|
```
|
||||||
|
2 - Start everything up
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d php-worker
|
||||||
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Use-Redis"></a>
|
<a name="Use-Redis"></a>
|
||||||
### Use Redis
|
### Use Redis
|
||||||
|
|
Loading…
Reference in New Issue