ucan_lab
Posted on May 9, 2020
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
š šŖ š
š©
ucan_lab
Posted on May 9, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.