With Docker
Nothing to install but Docker itself.http://localhost:8000, Vite on http://localhost:5173.
Why the dev image shares the production base
The development image is thedev target of docker/Dockerfile, built from the
same base stage as the production one. That is deliberate: a separately
assembled development image would have its own PHP build and extension set, and
every difference between the two becomes a bug that only appears after deployment.
What does differ is only what should:
- dev Composer dependencies are installed
- the source is mounted rather than copied, so edits are live
opcache.validate_timestamps=1, or nothing you type would take effect- the container runs as your user id, so files it writes stay yours
- Xdebug is available, off unless the image is built with
INSTALL_XDEBUG=1
vendor/ and node_modules/ are deliberately not mounted from the host.
They are installed inside the container for its own platform, and sharing them
would mix binaries built for a different OS.Xdebug
host.docker.internal, which resolves on Linux too
because compose maps it to the host gateway. If your IDE is elsewhere:
On your own machine
Requirements:- PHP 8.4 or newer
- Composer 2
- Node.js 20+ and npm
- PostgreSQL 15+ or compatible
- Redis
- PHP extensions:
pdo_pgsql,redis,intl,bcmath,gd,zip, pluspcntlandposixfor Horizon
1
Install dependencies
2
Prepare the environment
3
Migrate and run
composer run dev starts the Laravel dev server, the queue listener, pail
log tailing, and the Vite dev server together.