Skip to content

Recommendation for running Laravel Websocket #100

Answered by jaydrogers
jericopulvera asked this question in Q&A
Discussion options

You must be logged in to vote

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.

  1. Do not use supervisor, S6 Overlay will monitor the process(es) for you
  2. Run the websockets server as its own container (like a queue): https://github.com/serversideup/docker-php#running-a-laravel-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 …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jericopulvera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants