I created a nice development environment for Laravel 👍
Repository
https://github.com/ucan-lab/docker-laravel
Please try it ⭐️
Installing Docker
https://docs.docker.com/docker-for-mac/install/
Project Structure
.
├── src # Laravel project root directory
└── infra
├── docker
│ ├── mysql
│ │ ├── Dockerfile
│ │ └── my.cnf
│ ├── nginx
│ │ ├── Dockerfile
│ │ ├── Dockerfile.production
│ │ └── default.conf
│ └── php
│ ├── Dockerfile
│ ├── Dockerfile.production
│ ├── bash
│ │ ├── .bash_history
│ │ └── psysh
│ ├── php-fpm.d
│ │ └── zzz-www.conf => unix domain socket config file
│ ├── php.ini
│ └── php.production.ini
└── docker-compose.yml
How to use
Read the Makefile for the contents
A. Create a new laravel project
$ git clone git@github.com:ucan-lab/docker-laravel.git
$ cd docker-laravel
$ mkdir -p src
$ docker compose build
$ docker compose up -d
$ docker compose exec app composer create-project --prefer-dist laravel/laravel .
$ docker compose exec app php artisan key:generate
$ docker compose exec app php artisan storage:link
$ docker compose exec app chmod -R 777 storage bootstrap/cache
$ docker compose exec app php artisan migrate
B. Create a clone laravel project
$ git clone git@github.com:ucan-lab/docker-laravel.git
$ cd docker-laravel
$ mkdir -p src
$ docker compose build
$ docker compose up -d
$ docker compose exec app composer create-project --prefer-dist "laravel/laravel=6.*" .
$ docker compose exec app php artisan key:generate
$ docker compose exec app php artisan storage:link
$ docker compose exec app chmod -R 777 storage bootstrap/cache
$ docker compose exec app php artisan migrate
Top comments (3)
Well, if you are sharing a repo publicly for others to use, then shouldn't you put things to default. I can see the timezone being set to Tokyo, Japan. Now, those who are not very familiar will be having a problem.
Thank you for your feedback. That's right.
The time zone, locale, and MySQL string collation were set to Japan.
It has been restored to the default so that many people can use it.
github.com/ucan-lab/docker-laravel...
Thank you for talking my feedback in a positive way and for that quick fix.