Welcome to the base Swoole application repository.
This repository contains a basic application built using the Swoole extension in PHP 8.3. It includes an HttpServer and a WebSocketServer.
The application demonstrates how to implement a simple router, manage routes, and handle WebSocket connections and Coroutines efficiently.
Follow the steps below to set up and run the application.
- Docker: Setting Up Docker on Ubuntu
- Build Images:
docker compose build- Run the Containers:
docker compose up -d- Access the Examples:
http://localhost/examples
Explore the examples to see how to leverage Swoole for high-performance network programming.
| Application | Type | Address |
|---|---|---|
| Interface | Nginx/JS | http://localhost:80 |
| API | Swoole | http://localhost:8080 |
| WebSocket | Swoole | http://localhost:9090 |
| Description | Location |
|---|---|
| Docker's Entrypoint | /docker/entrypoint.sh |
| Server's Starting point | /docker/supervisord/* |
| Application's Bootstrap | /bootstrap/app.php |
| HTTP Server | /app/Servers/HttpServer.php |
| Websocket Server | /app/Servers/WebSocketServer.php |
| Router | /app/Router.php |
| Examples | /public/examples/* |