This is an initial template of a plugin for Buddy that you can use to develop.
composer.json
and edit it with your plugin name, dependencies, and everything else you need.composer install
to make it work.manticore-executor
; we strictly recommend using the Docker flow.src/Payload.php
, add logic to parse the request, and prepare the payload structure for your command processing.src/Handler.php
and implement processing logic and response that will be proxied by Manticore to the client.Clone Buddy somewhere to your host machine and go into it.
Run this command to create a Docker image named manticore-buddy
:
docker run --privileged --entrypoint bash -v $(pwd):/workdir -w /workdir --name manticore-buddy --network host -it manticoresearch/manticore-executor-kit:latest
Now you can edit /etc/manticore.conf
and configure the development version of Buddy:
buddy_path = manticore-executor-dev /workdir/src/main.php --debug
Run searchd --nodetach
to keep the daemon in the foreground and enjoy the development of your new plugin.
You can use pre-commit
to install code style and code analyze hooks by running pre-commit install
. Check our PHP code style and guide here.