flytachi / nexus
Extra Framework
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/flytachi/nexus
Requires
- php: >=8.3
- ext-pcntl: *
- flytachi/kernel: ~5.8.0
- php-amqplib/php-amqplib: @stable
Requires (Dev)
- phpunit/phpunit: @stable
README
📌 Description
Nexus is a lightweight event broker and process orchestrator built to work with queues. Its task is to launch the main process, which raises the required number of units (workers), distributes tasks between them and controls their life cycle.
🔧 Features:
✅ Starting and managing a worker process pool
✅ Monitoring their condition (health check, logs)
✅ Automatic restart in case of failures
✅ Scaling: you can set the number of units for each task
✅ Working through message queues (pub/sub model)
✅ Suitable for microservice architecture and backend workers
Installation
Requirements
- RabbitMQ host
- php 8.3
- composer
or
- RabbitMQ host
- Docker / docker-compose
Settings (composer)
-- Be sure to set up an environment variable (Environment)
composer check-platform-reqs
Install all missing components
composer install
Settings (docker)
-- Be sure to set up an environment variable (Environment)
Collect image
docker build -t smpp_kannel_server .
Launch container
docker run -d --name smpp_kannel_server --network bridge -p 8000:80 -v $(pwd):/var/www/html smpp_kannel_server
Settings (docker-compose)
Launch container
docker compose up -d
Environment
The environment must contain a list of values.
In an environment variable or in a .env file (example root/.env)
TIME_ZONE=UTC DEBUG=false LOGGER_LEVEL_ALLOW=INFO,NOTICE,WARNING,ERROR,CRITICAL,ALERT,EMERGENCY LOGGER_MAX_FILES=10 LOGGER_FILE_DATE_FORMAT=Y-m-d LOGGER_LINE_DATE_FORMAT="Y-m-d H:i:s P" AMQP_API_PORT=15672 AMQP_API_VHOST=/ AMQP_HOST=localhost AMQP_PORT=5672 AMQP_USER=guest AMQP_PASS=guest WEB_ADMIN_USER=admin # Web interface (username) WEB_ADMIN_PASS=admin # Web interface (username) UNIT_BALANCER=1 # Qty Units (consumers)
Service command
Commands for service management! The shell must be responsive (php >= 8.3),
otherwise the commands will not work
Start service:
php extra run script core.service start
Stop service:
php extra run script core.service stop
Service status:
php extra run script core.service status
Api Interface
started (php/composer) started web interface
php extra run serve --port=8111
In the browser, contact the address http://0.0.0.0:8111/web
For authorization, set the required values in the environment WEB_ADMIN_USER and WEB_ADMIN_PASS
License
This project is licensed under the MIT License - see the LICENSE file for details.