This provides a docker-based development environment to start working with Laravel.
cp .env.example .env
docker-compose up
docker-compose exec app composer install
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan migrate
docker-compose exec front npm install && npm run dev
The app should be available via http://localhost:8000/.
You can easily import a data dump into MySQL if you'd like to. The MySQL container will automatically
will detect a dump in .docker/mysql/config/initdb
directory, unpack and import it.
However, if you have already initialized the db container, then you will need to remove the data before import:
docker-compose down
rm -rf .docker/mysql/data
docker-compose up
You can connect to the DB from your host machine through 33060
port.
Simple, just copy the following files/folders into the existing project and adjust the existing .env
file with the values of the provided .env.example
.
.docker
.env.example
docker-compose.yml