Everything you need to know about setting up and using Lara Anchor.
The install script downloads and extracts the latest template.
Update the database credentials in .env
Starts PHP 8.5, MySQL 8.3, and optional Node 22 containers.
Done! Your Laravel application is now running on http://localhost:8000
Key environment variables for Docker configuration:
Note: Always use strong passwords in production. Update MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD.
Start Containers
Stop Containers
View Logs
Run Artisan
Run Composer
Access Database
Rebuild Containers
Run pnpm (Node)
Your Laravel project files are mounted as volumes. Changes are instantly reflected in the container without rebuilds.
Enable debug mode in your .env file:
Connect to MySQL using a GUI client or command line:
Problem: Port 8000 is already in use.
Change the port in docker-compose.yml or kill the process:
Problem: Can't connect to MySQL.
Ensure MySQL container is running:
Problem: Cannot write to storage/ or bootstrap/ directories.
Fix permissions inside the container:
Why no Nginx?
Laravel's built-in development server is sufficient for development and removes unnecessary complexity. For production, add Nginx separately.
Why no Redis?
Removed to keep the setup lightweight. If you need caching or queues, add it to docker-compose.yml. Most Laravel apps don't require it in development.
Can I use this in production?
This is designed for development. For production, consider adding Nginx, a reverse proxy, proper logging, and security configurations.
How do I add Redis?
Add a Redis service to docker-compose.yml and configure CACHE_DRIVER and QUEUE_CONNECTION in .env.
Can I modify memory limits?
Yes. Update APP_MEM_LIMIT and DB_MEM_LIMIT in .env, or edit mem_limit values in docker-compose.yml directly.
Check the troubleshooting section above or browse the official documentation.
Back to Home