laravel-rabbitmq/README.md

64 lines
875 B
Markdown

# Install
You should change the /src/.env.example file name to .env and run
```
docker network create laravel
docker compose up rabbitmq socketio -d
```
# Clone container
.env
```
VERSION=1
```
run
```
docker compose up app -d
```
laravel-rabbitmq{VERSION}
```
laravel-rabbitmq1
```
PORT
http://localhost:800{VERSION}
```
http://localhost:8001
```
# Monitor
Version: 1
```
http://localhost:8001/horizon
```
Rabbitmq: rabbit/rabbit@123
```
http://localhost:15672
```
# Test
Attach shell to Version`1`
```
docker exec -it laravel-rabbitmq1-app-1 bash
```
Test Job: src/app/Console/Commands/JobRun.php
```
php artisan job:run
```
# Log
> [!NOTE]
>
> `-f`: file <br>
> `--tail 10`: Watch only see the last 10 lines
View log `app`
```
docker logs -f --tail 10 laravel-rabbitmq1-app-1
```
View log `puppeteer`
```
docker logs -f --tail 10 laravel-rabbitmq1-puppeteer-1
```