DEV Community

StuartCreed
StuartCreed

Posted on • Updated on

How to make Spatie Ray work with Laravel Sail

1) sail composer require spatie/laravel-ray --dev
2) php artisan ray:publish-config --docker
3) Set the values in ray.php to:

'host' => 'host.docker.internal',
'port' => 23517,
'remote_path' => '/var/www/html',
'local_path' => '/Users/me/projects/project'

OR

Add this to your .env file:
RAY_HOST=host.docker.internal
RAY_PORT=23517
RAY_REMOTE_PATH=/var/www/html
RAY_LOCAL_PATH=/Users/me/projects/project

4) Add '127.0.0.1 host.docker.internal' to /etc/hosts

For docksal the setup is:

RAY_HOST=192.168.64.100
RAY_PORT=23517
RAY_REMOTE_PATH=/var/www/web
RAY_LOCAL_PATH=/Users/me/projects/project/web

Top comments (3)

Collapse
 
mateusgalasso profile image
Mateus Galasso

Nice, Worked for me

Collapse
 
andres_gcarmona profile image
Andy Carmona

Thank you!

Collapse
 
zaimazhar profile image
zaimazhar • Edited

Worked for me as well