Laravel in docker

docker-compose.yml

Install Laravel

If you have a repo ready then clone it into a directory called laravel.

If you want a fresh install then skip to the next step.

.env

Make sure your db name is the same in your docker-compose.yml

Node

npm install
Do this now so the docker image can read the volume.

docker up

docker-compose up
Along with mariadb, laravel and phpmyadmin; I think composer install gets run.

Database

Go to your phpmyadmin image and upload it.

Notes

  • Turn your localhost webserver off (e.g. apachectl).
  • docker-compose down -v will delete the volumes and allow you to try again with a clean install.
Advertisements