Skip to content

Instantly share code, notes, and snippets.

@mahkassem
Last active July 8, 2024 04:07
Show Gist options
  • Save mahkassem/2290ee2faf8e7edcaeaaefde737ad4a3 to your computer and use it in GitHub Desktop.
Save mahkassem/2290ee2faf8e7edcaeaaefde737ad4a3 to your computer and use it in GitHub Desktop.
Laravel Octane PM2 Configuration

How to use

  • Add laravel-octane-pm2.yml in laravel app base directory
  • start using pm2 start laravel-octane-pm2.yml
  • Enable pm2 to auto start your app using pm2 save
apps:
- name: laravel-octane
script: artisan
exec_mode: fork
interpreter: php
instances: 1
args:
- octane:start
- --server=swoole
- --max-requests=1000
- --host=127.0.0.1
- --port=8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment