- Composer
- PHP7
- PHP Sockets Extensions Installed
The services shows a basic example of how to create a service for processing videos with RabbitMQ.
- Ensure RabbitMQ is installed and running locally
- Run
composer install
to install required packages - Open up two tabs in your console
- In one tab, run
php server.php
- In the other tab, run
php client.php
https://github.com/ProdigyView-Toolkit/Microservices-Examples-PHP
This application use vscode devcontainer for building dev environnement.
Devcontainer will build and launch php & rabbitmq containers.
It will map current source dir inside /workspace and src/ iniside /var/www/html.
VsCode terminal is opened inside the php-app container.
Application is available on http://localhost:8080
Rabbitmq management UI is available on http://localhost:15672 with guest/guest credentials.
git clone <...>
docker compose up -d
Application is available on http://localhost:8080
Rabbitmq management UI is available on http://localhost:15672 with guest/guest credentials.
:Warning: You MUST exit devcontainer before launching the "docker compose up" command.
On the first tab http://localhost:8080/server.php,
On the second tab http://localhost:8080/client.php,
Few seconds later, video.mov will be available inside /var/www/html (in src/ directory in dev mode)
You can download it on http://localhost:8080/video.mov