lando / lando/php

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

Open
#12 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Triage
Dominant language
Dockerfile
Stars
20
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied Lando configuration, especially the websockets PHP CLI service running php /app/artisan websockets:serve on port 6001. Check how port forwarding and service-to-service access work for CLI services; done means port 6001 is reachable from the host and from the other services.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.