Recommendation for running Laravel Websocket #100
Answered
by
jaydrogers
jericopulvera
asked this question in
Q&A
|
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 |
Answered by
jaydrogers
Dec 9, 2022
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! |
0 replies
Answer selected by
jericopulvera
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: