Recommendation for running Laravel Websocket #100
-
https://beyondco.de/docs/laravel-websockets/basic-usage/starting Is there a way define a supervisord within Dockerfile without having conflict with the base image? or will it be okay to just add |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Using Docker + S6 Overlay + Supervisor can cause your image to get too "crowded". To compare, it's like having "too many chefs in the kitchen". I have not attempted to use Beyond Code's Laravel Web sockets, but I assume it would work like a queue.
I have not tested this, but here is an example of what I would do to get started: version: '3'
services:
php:
image: my/laravel-app
environment:
PHP_POOL_NAME: "my-app_php"
websockets:
image: my/laravel-app
# Switch to "webuser" before running `php artisan`
# Declare command in list manner for environment variable expansion
command: ["su", "webuser", "-c", "php artisan websockets:serve"]
environment:
PHP_POOL_NAME: "my-app_websockets" Let me know if that works for you. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Using Docker + S6 Overlay + Supervisor can cause your image to get too "crowded". To compare, it's like having "too many chefs in the kitchen".
I have not attempted to use Beyond Code's Laravel Web sockets, but I assume it would work like a queue.
I have not tested this, but here is an example of what I would do to get started: