fastybird / miniserver
FastyBird IoT MiniServer application
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.4.0
- contributte/event-dispatcher: ^0.8
- contributte/translation: ^0.9
- fastybird/accounts-module: ^0.19
- fastybird/bootstrap: ^0.5
- fastybird/devices-module: ^0.61
- fastybird/exchange: ^0.43
- fastybird/fb-bus-connector: ^0.46
- fastybird/fb-mqtt-connector: ^0.24
- fastybird/homekit-connector: ^0.10
- fastybird/metadata: ^0.61
- fastybird/modbus-connector: ^0.28
- fastybird/redisdb-exchange-plugin: ^0.47
- fastybird/redisdb-storage-plugin: ^0.8
- fastybird/shelly-connector: ^0.31
- fastybird/socket-server-factory: ^0.4
- fastybird/triggers-module: ^0.36
- fastybird/tuya-connector: ^0.4
- fastybird/ui-module: @dev
- fastybird/virtual-connector: ^0.3
- fastybird/web-server-plugin: ^0.9
- fastybird/ws-server-plugin: ^0.15
- ipub/websockets-wamp: ^1.4
- sunrise/http-server-request: ^2.0
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- mockery/mockery: ^1.4
- ninjify/nunjuck: ^0.3
- ninjify/qa: ^0.12
- pds/skeleton: ^1.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^0.12
- phpstan/phpstan-deprecation-rules: ^0.12
- phpstan/phpstan-doctrine: ^0.12
- phpstan/phpstan-nette: ^0.12
- phpstan/phpstan-strict-rules: ^0.12
- tracy/tracy: ^2.9
This package is auto-updated.
Last update: 2022-06-10 08:04:28 UTC
README
What is FastyBird IoT MiniServer?
MiniServer is part of FastyBird IoT MiniServer application.
FastyBird IoT MiniServer is an Apache2 licensed distributed application, developed in PHP with Nette framework.
Requirements
FastyBird MiniServer is tested against PHP 7.4, Redis 6.2.2 in-memory data store, MySQL relational database management system, ReactPHP http 0.8 event-driven, streaming plaintext HTTP server and Nette framework 3.0 PHP framework for real programmers.
Getting started
NOTE: If you don't want to install it manually, try docker image
The best way to install fastybird/miniserver is using Composer. If you don't have Composer yet, download it following the instructions. Then use command:
composer create-project --no-dev fastybird/miniserver path/to/install
cd path/to/install
Everything required will be then installed in the provided folder path/to/install
Running app
You have two options how to run this app
Running an app via ReactPHP http server
All what you need is just run one console command:
vendor/bin/fb-console fb:web-server:start
This command will start build in web server which is listening for incoming http api request messages from clients.
Running an app via Apache or Nginx
You have to configure you web server running on Apache or Nginx to server content from www
folder.
In this folder is main entry point for accessing application api.
Install with docker
Docker image: fastybird/miniserver
Use docker hub image
docker run -d -it --name devices fastybird/miniserver:latest
Generate local image
docker build --tag=miniserver .
docker run -d -it --name miniserver miniserver
Configuration
This application is preconfigured for default connections, but your infrastructure could be different.
Configuration could be made via environment variables:
Environment Variable | Description |
---|---|
FB_APP_PARAMETER__DATABASE_VERSION=5.7 |
MySQL server version |
FB_APP_PARAMETER__DATABASE_HOST=127.0.0.1 |
MySQL host address |
FB_APP_PARAMETER__DATABASE_PORT=3306 |
MySQL access port |
FB_APP_PARAMETER__DATABASE_DBNAME=fb_miniserver |
MySQL database name |
FB_APP_PARAMETER__DATABASE_USERNAME=miniserver |
Username |
FB_APP_PARAMETER__DATABASE_PASSWORD=miniserver |
Password |
FB_APP_PARAMETER__REDIS_HOST=127.0.0.1 |
Redis server host address |
FB_APP_PARAMETER__REDIS_PORT=6379 |
Redis server access port |
FB_APP_PARAMETER__REDIS_USERNAME= |
Redis server username |
FB_APP_PARAMETER__REDIS_PASSWORD= |
Redis server password |
FB_APP_PARAMETER__SERVER_ADDRESS=0.0.0.0 |
HTTP server host address |
FB_APP_PARAMETER__SERVER_PORT=8000 |
HTTP server access port |
FB_APP_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 create configuration file
./config/local.neon
and put your settings here.
Initialization
This application 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, application could be started with server command
Feedback
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.
Changelog
For release info check release page
Maintainers
Adam Kadlec |
Homepage https://www.fastybird.com and repository https://github.com/fastybird/miniserver.