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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners