Skip to content

ucan-lab/docker-laravel

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
December 8, 2023 18:10
February 14, 2021 17:37
March 5, 2022 02:09
December 2, 2023 12:59
December 9, 2023 01:49
December 2, 2023 12:59
December 14, 2023 23:13

docker-laravel 🐳

docker-laravel

Test laravel-create-project.yml Test laravel-git-clone.yml License

Introduction

Build a simple laravel development environment with docker-compose. Compatible with Windows(WSL2), macOS(M1) and Linux.

Usage

Create an initial Laravel project

  1. Click Use this template
  2. Git clone & change directory
  3. Execute the following command
$ task create-project

# or...

$ make create-project

# or...

$ 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

http://localhost

Create an existing Laravel project

  1. Git clone & change directory
  2. Execute the following command
$ task install

# or...

$ make install

# or...

$ docker compose build
$ docker compose up -d
$ docker compose exec app composer install
$ docker compose exec app cp .env.example .env
$ 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

http://localhost

Tips

Container structures

β”œβ”€β”€ app
β”œβ”€β”€ web
└── db

app container

web container

db container

mailpit container