Go to file
Kai Ton f81c2a26da add notify by socketio 2024-03-04 09:50:43 +00:00
.docker add notify by socketio 2024-03-04 09:50:43 +00:00
.vscode restructure project 2024-03-01 09:19:04 +00:00
chrome-profiles add profiles for chrome 2024-02-27 02:50:54 +00:00
consumer add notify by socketio 2024-03-04 09:50:43 +00:00
producer add notify by socketio 2024-03-04 09:50:43 +00:00
screenshot refactor architecture message queue with pupeteer 2024-03-01 22:45:06 +00:00
.env update document 2024-02-24 03:34:57 +00:00
.gitconfig add git config 2024-02-27 02:51:23 +00:00
README.md refactor architecture message queue with pupeteer 2024-03-01 22:45:06 +00:00
docker-compose.yml update docker compose 2024-03-04 01:42:04 +00:00

README.md

Install

You should change the /src/.env.example file name to .env and run

docker network create consumer
docker compose up rabbitmq socketio -d

Clone CONSUMER container

.env

VERSION=1

run

docker compose up consumer -d

laravel-rabbitmq{VERSION}

laravel-rabbitmq1

Monitor

Rabbitmq: rabbit/rabbit123

http://localhost:15672

Test

Run job on website

http://localhost:8000/terminal

Job: producer/app/Console/Commands/JobRun.php

artisan job:run

code

use Illuminate\Support\Facades\Queue;
Queue::connection('rabbitmq')
    ->push(
        job: 'not_laravel',
        queue: 'puppeteer',
        data: [
            'url' => env('PUPPETEER_URL'),
        ],
    );

Log

[!NOTE]

-f: file
--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