Skip to content

Instantly share code, notes, and snippets.

@kiddtang
Created July 9, 2021 09:03
Show Gist options
  • Save kiddtang/d3969ddc13ba04124d91023774afb62d to your computer and use it in GitHub Desktop.
Save kiddtang/d3969ddc13ba04124d91023774afb62d to your computer and use it in GitHub Desktop.
Concurrent PHP Serve & Swoole
version: '3'
services:
laravel.test:
build:
context: ./docker/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
XDEBUG: '${APP_DEBUG:-false}'
XDEBUG_PORT: '${SAIL_XDEBUG_PORT:-9000}'
image: sail-8.0/app
ports:
- '${APP_PORT:-80}:80'
- 8000:8000
version: '3'
services:
laravel.test:
build:
context: ./docker/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
XDEBUG: '${APP_DEBUG:-false}'
XDEBUG_PORT: '${SAIL_XDEBUG_PORT:-9000}'
image: sail-8.0/app
ports:
- '${APP_PORT:-80}:80'
- 8000:8000
...
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:php-octane]
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --server=swoole --host=0.0.0.0 --port=8000 --watch
user=sail
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:php-serve]
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80
user=sail
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment