Skip to content

A docker-compose based template which makes it easy to develop a Laravel app on your local system.

Notifications You must be signed in to change notification settings

dovidgef/docker-compose-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-compose-laravel

A docker-compose workflow that sets up a LEMP network of containers for local Laravel development.

Usage

To get started, make sure you have Docker installed on your system, and then clone this repository.

Containers created and their ports (if used) are as follows:

  • nginx - :8080
  • mysql - :3306
  • php -
  • phpmyadmin - :9000
  • npm

Create new Laravel project using Composer docker-compose exec php composer create-project --prefer-dist laravel/laravel src

Alternatively you can clone your existing Laravel application

# Switch into php/ directory then run:
git clone [email protected]:username/laravel-project.git src

Update Laravel .env file to match docker-compose configuration

APP_URL=http://localhost:8080
DB_HOST=db
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

Run Artisan commands docker-compose exec php php src/artisan migrate

Run npm commands without installing locally

  • docker-compose run npm run dev

About

A docker-compose based template which makes it easy to develop a Laravel app on your local system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published