Triggers node is a core microservice for managing & running automation logic and exposing it for clients.
FastyBird triggers node is an Apache2 licensed distributed microservice, developed in PHP with Nette framework.
FastyBird triggers node is tested against PHP 7.4 and ReactPHP http 0.8 event-driven, streaming plaintext HTTP server and RabbitMQ 3.7 message broker
NOTE: If you don't want to install it manually, try docker image
The best way to install fastybird/triggers-node is using Composer. If you don't have Composer yet, download it following the instructions. Then use command:
$ composer create-project --no-dev fastybird/triggers-node path/to/install
$ cd path/to/install
Everything required will be then installed in the provided folder path/to/install
This microservice has one console command.
$ vendor/bin/fb-console fb:node:server:start
This command is to start build in web server which is listening for incoming http api request messages from clients and is listening for new data from exchange bus from other microservices.
Docker image: fastybird/triggers-node
$ docker run -d -it --name triggers fastybird/triggers-node:latest
$ docker build --tag=triggers-node .
$ docker run -d -it --name triggers-node triggers-node
This microservice is preconfigured for default connections, but your infrastructure could be different.
Configuration could be made via environment variables:
Environment Variable | Description |
---|---|
FB_NODE_PARAMETER__EXCHANGE_HOST=127.0.0.1 |
RabbitMQ host address |
FB_NODE_PARAMETER__EXCHANGE_PORT=5672 |
RabbitMQ access port |
FB_NODE_PARAMETER__EXCHANGE_VHOST=/ |
RabbitMQ vhost |
FB_NODE_PARAMETER__EXCHANGE_USERNAME=guest |
Username |
FB_NODE_PARAMETER__EXCHANGE_PASSWORD=guest |
Password |
FB_NODE_PARAMETER__DATABASE_VERSION=5.7 |
MySQL server version |
FB_NODE_PARAMETER__DATABASE_HOST=127.0.0.1 |
MySQL host address |
FB_NODE_PARAMETER__DATABASE_PORT=3306 |
MySQL access port |
FB_NODE_PARAMETER__DATABASE_DBNAME=triggers_node |
MySQL database name |
FB_NODE_PARAMETER__DATABASE_USERNAME=root |
Username |
FB_NODE_PARAMETER__DATABASE_PASSWORD= |
Password |
FB_NODE_PARAMETER__SERVER_ADDRESS=0.0.0.0 |
HTTP server host address |
FB_NODE_PARAMETER__SERVER_PORT=8000 |
HTTP server access port |
FB_NODE_PARAMETER__SECURITY_SIGNATURE= |
Security token signature string |
NOTE: In case you are not using docker image or you are not able to configure environment variables, you could edit configuration file
./config/default.neon
This microservice is using database, and need some initial data to be inserted into it. This could be done via shell command:
$ vendor/bin/fb-console fb:initialize
This console command is interactive and will ask for all required information.
After this steps, microservice could be started with server command
Use the issue tracker for bugs or mail or Tweet us for any idea that can improve the project.
Thank you for testing, reporting and contributing.
For release info check release page
Adam Kadlec |
Homepage https://www.fastybird.com and repository https://github.com/fastybird/triggers-node.