Skip to content

haruu11113/docker-laravel-template

Repository files navigation

docker-laravel 🐳

こちらの記事を参考に、させていただいています。 qiita : 最強のLaravel開発環境をDockerを使って構築する【新編集版】

Introduction

Build a simple laravel development environment with docker-compose.

Usage

start with docker

$ git clone git@github.com:haruu11113/docker-laravel-template.git
$ cd docker-laravel-template
$ cp .env.example .env
-> edit .env
$ make init

start new project

$ git clone git@github.com:haruu11113/docker-laravel-template.git
$ cd docker-laravel-template
$ make create-project # Install the latest Laravel project
$ make install-recommend-packages # Not required

http://localhost

start clone project

$ git clone git@github.com:haruu11113/docker-laravel-template.git
$ git cloen <project url: git@github.com:???????????????.git> docker-laravel-template/backend
$ cd docker-laravel-template
$ make init

http://localhost

Tips

Container structure

├── app
├── web
└── db

app container

web container

  • Base image

db container

Persistent MySQL Storage

By default, the named volume is mounted, so MySQL data remains even if the container is destroyed. If you want to delete MySQL data intentionally, execute the following command.

$ docker-compose down -v && docker-compose up

License

copyright (c) 2021 haruu11113/docker-laravel-template https://github.com/haruu11113/docker-laravel-template/blob/main/LICENSE

copyright (c) 2020 ucan-lab/docker-laravel https://github.com/ucan-lab/docker-laravel/blob/main/LICENSE