You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before installing Laravel Octane, ensure your system meets the basic requirements. The specific requirements may vary depending on which application server you choose (Swoole, FrankenPHP, or RoadRunner).
20
+
19
21
::: warning Requirements
20
-
- Swoole PHP extension must be installed on your system
21
-
- PHP 8.2 or higher
22
+
- PHP 8.2
22
23
- Existing Bagisto installation
23
24
:::
24
25
26
+
### Server-Specific Requirements
27
+
28
+
Choose one of the following server options:
29
+
30
+
#### For Swoole Server
31
+
32
+
- Swoole PHP extension must be installed on your system
33
+
25
34
Verify Swoole is installed:
26
35
27
36
```bash
28
37
php --ri swoole
29
38
```
30
39
40
+
#### For FrankenPHP Server
41
+
42
+
- No additional PHP extensions required
43
+
- FrankenPHP binary will be automatically downloaded during installation
44
+
- Supports automatic HTTPS, HTTP/2, and HTTP/3 out of the box
45
+
46
+
Verify FrankenPHP (after installation):
47
+
48
+
```bash
49
+
./frankenphp version
50
+
```
51
+
52
+
#### For RoadRunner Server
53
+
54
+
- No additional PHP extensions required
55
+
- RoadRunner binary will be automatically downloaded during installation
56
+
- Built with Go for high performance and scalability
57
+
- Supports HTTP, gRPC, and background job processing
58
+
59
+
Verify RoadRunner (after installation):
60
+
61
+
```bash
62
+
./rr version
63
+
```
64
+
31
65
## Installation
32
66
33
-
Laravel Octane installation for Bagisto involves installing the Octane package via Composer and then configuring it to use Swooleas the application server. This process will enhance your Bagisto application's performance significantly.
67
+
Laravel Octane installation for Bagisto involves installing the Octane package via Composer and then configuring it to use Swoole, FrankenPHP, or RoadRunner as the application server. All three options will enhance your Bagisto application's performance significantly.
34
68
35
69
### Install Laravel Octane
36
70
@@ -43,73 +77,121 @@ cd /path/to/your/bagisto
43
77
# Install Laravel Octane
44
78
composer require laravel/octane
45
79
46
-
# Install Octane with Swoole
80
+
# Install Octane (will prompt for server selection)
47
81
php artisan octane:install
48
82
```
49
83
50
-
::: tip Developer Note
51
-
After running `php artisan octane:install`, the terminal will prompt you to select a server. Choose **Swoole** from the available options:
52
-
- Swoole
53
-
- RoadRunner
54
-
- FrankenPHP
84
+
### Choose Your Server
85
+
86
+
::: tip Server Selection
87
+
After running `php artisan octane:install`, the terminal will prompt you to select a server from these options:
88
+
-**Swoole** - High-performance async PHP server with advanced features like concurrent tasks
89
+
-**FrankenPHP** - Modern PHP server with native HTTP/2, HTTP/3, and automatic HTTPS
90
+
-**RoadRunner** - Go-based application server with excellent performance and plugin ecosystem
55
91
56
-
We're configuring Octane with Swoole throughout this guide, so make sure to select Swoole when prompted to ensure consistency with the configuration examples provided.
92
+
All three servers are excellent choices for Bagisto. This guide covers all options.
57
93
:::
58
94
95
+
### Direct Installation Options
96
+
97
+
If you prefer to skip the interactive prompt:
98
+
99
+
```bash
100
+
# Install with Swoole
101
+
php artisan octane:install --server=swoole
102
+
103
+
# Install with FrankenPHP
104
+
php artisan octane:install --server=frankenphp
105
+
106
+
# Install with RoadRunner
107
+
php artisan octane:install --server=roadrunner
108
+
```
109
+
110
+
### RoadRunner Additional Setup
111
+
112
+
For RoadRunner, you may also need to install additional packages:
113
+
114
+
```bash
115
+
# Install RoadRunner CLI and HTTP packages (optional)
After completing the installation, you'll notice that `OCTANE_SERVER=swoole` has been automatically added to the end of your `.env` file. If for some reason it's not there, you can add it manually.
121
+
After completing the installation, the appropriate server configuration will be automatically added to your `.env` file based on your selection.
122
+
123
+
### For Swoole Server
62
124
63
125
```properties
64
126
OCTANE_SERVER=swoole
65
127
```
66
128
129
+
### For FrankenPHP Server
130
+
131
+
```properties
132
+
OCTANE_SERVER=frankenphp
133
+
```
134
+
135
+
### For RoadRunner Server
136
+
137
+
```properties
138
+
OCTANE_SERVER=roadrunner
139
+
```
140
+
67
141
## Running Octane
68
142
69
-
Start Octane for production without file watching:
143
+
### Basic Usage
144
+
145
+
Start Octane server (uses configured server from .env):
70
146
71
147
```bash
72
148
php artisan octane:start
73
149
```
74
150
75
151
## Common Issues
76
152
77
-
While Laravel Octane with Swoole is generally stable, you might encounter some common issues during setup or operation. Here are the most frequent problems and their solutions to help you troubleshoot your Bagisto Octane installation.
153
+
While Laravel Octane with Swoole, FrankenPHP, and RoadRunner is generally stable, you might encounter some common issues during setup or operation. Here are the most frequent problems and their solutions to help you troubleshoot your Bagisto Octane installation.
78
154
79
-
### Troubleshooting
155
+
### General Troubleshooting
80
156
81
157
| Problem | Solution |
82
158
|---------|----------|
83
-
|**Port already in use**| Change `OCTANE_PORT` or stop conflicting services |
84
-
|**Memory leaks**| Reduce `OCTANE_MAX_REQUESTS` to restart workers more frequently|
159
+
|**Port already in use**| Change the port or stop conflicting services |
160
+
|**Memory leaks**| Reduce the max request by specifying in the octane command|
85
161
|**Slow startup**| Ensure database connections are properly configured |
86
-
87
-
### Debug Commands
88
-
89
-
Use these diagnostic commands to verify your Octane installation, check system compatibility, and monitor running processes. These commands are essential for troubleshooting and ensuring everything is working correctly.
0 commit comments