Docker development environment for Laravel projects with Docker Compose.
The project contains the essentials for Laravel projects. It has a workspace container which you can use to run php and node commands.
The following containers are available:
- Workspace
- Apache2
- PHP-FPM
- MariaDB
In the root of the project you can find an env-example file with environment variables and comments with info about them.
- Add to your project as a submodule or simply
git clone - Make a copy of
env-exampleto create a.envfile - Edit the
.envfile to your liking - Make sure to edit the variable
COMPOSE_PROJECT_NAMEif you have multiple projects with Laravel-docker - Run
docker-compose up
To issue composer, artisan or npm commands, you can use the workspace container after the following:
docker-compose exec --user=wsuser workspace bash