In my https://dev.to/snakepy/how-to-debug-laravel-apps-with-laravel-apps-with-xdebuger-in-vs-code-8cp I showed how you can set up XDebug for a simple dev environment, which used php artisan serve. Once you understand the set up, it will probably soon be your favorite Laravel dev environment as well.

dockerfile: Dockerfile command: php artisan serve --host=0.0.0.0 volumes: -.:/app ports: depends_on: - db - composer networks: - proxynet env_file: -.env queue: extra_hosts: - "host.docker.internal:host-gateway" volumes: -.:/app build: context:.

In my example we are exposing php artisan serve on port 8000 and nginx on port 10000.

docker ps # to get the name of the app container docker exec -it bash php aritsan config:clear php artisan cache:clear php artisan route:clear php artisan migrate
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners