Skip to content

Open up port 6001 for laravel-websockets (php via cli service) #12

Description

@eminos

I'm trying to figure out how to run laravel-websockets with lando.
https://beyondco.de/docs/laravel-websockets/getting-started/introduction
laravel-websockets is a PHP CLI Ratchet application running on port 6001.

This is my lando file:

name: lintex
recipe: laravel
config:
  webroot: public
  php: '7.4'
  composer_version: '2.0.4'
  via: nginx
  database: mysql:8.0
  cache: redis
excludes:
  - vendor
  - node_modules
proxy:
  appserver_nginx:
    - lintex.local
    - "*.lintex.local"
  websockets:
    - lintex.local:6001
services:
  database:
    type: mysql:8.0
    portforward: 3306
    creds:
      user: lintex
      password: lintex
      database: lintex
  horizon:
    type: php:7.4
    via: cli
    command: php /app/artisan horizon
  websockets:
    type: php:7.4
    via: cli
    portforward: 6001
    ports:
      - '6001'
    command: php /app/artisan websockets:serve
bindAddress: "0.0.0.0"

It seems the port 6001 is not accessible from the host.
The websockets service also needs to be accessable from the other services.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions