https://github.com/k911/swoole-bundle-symfony-demo
Minimal hello world Symfony application built with Swoole and Docker
https://github.com/k911/swoole-bundle-symfony-demo
async demo docker php swoole symfony-bundle
Last synced: over 1 year ago
JSON representation
Minimal hello world Symfony application built with Swoole and Docker
- Host: GitHub
- URL: https://github.com/k911/swoole-bundle-symfony-demo
- Owner: k911
- License: mit
- Created: 2019-04-28T19:17:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T18:38:15.000Z (over 1 year ago)
- Last Synced: 2025-04-05T15:04:10.805Z (over 1 year ago)
- Topics: async, demo, docker, php, swoole, symfony-bundle
- Language: PHP
- Homepage:
- Size: 250 KB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swoole Bundle - Symfony Demo
Minimal hello world [Symfony](https://symfony.com/) application with [`k911/swoole-bundle`](https://github.com/k911/swoole-bundle) and [Docker](https://docs.docker.com/get-started/).
## Quick start - docker
*Requirements:*
- [composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)
- [Docker](https://docs.docker.com/install/)
- [docker-compose](https://docs.docker.com/compose/install/)
```bash
docker-compose build
docker-compose up
```
## Quick start - local
*Requirements:*
- PHP v7.4 and up
- [composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)
- [Swoole PHP Extension v4.4.7 and up](https://github.com/swoole/swoole-src)
```bash
composer install
./bin/console swoole:server:run
```
## Links / usage
- [Lucky number generator](http://localhost:9501)
```sh
curl http://localhost:9501
```
- [Lucky number generator with output to CLI (implemented using Symfony Messenger)](http://localhost:9501/messenger)
```sh
curl http://localhost:9501/messenger
```
- [Server API Access](localhost:9200/api/server)
```sh
# Gets server info
curl http://localhost:9200/api/server
# Reload server
curl -X PATCH http://localhost:9200/api/server
# Shutdown server
curl -X DELETE http://localhost:9200/api/server
```
- Get server status and metrics
```sh
bin/console swoole:server:status
```