Skip to content

DevPlus31/laravel-start-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Docker Laravel MySQL Nginx Starter

Project Starter For Web Application Development with Laravel, MySQL, Nginx, and Docker.

Contributors Stargazers Issues

Features

Getting Started

Follow the instruction below to setting up your project.

Prerequisites

Clone This Template For Your Project

  • By Clicking Use This Template Button or You can Click Here

image

Run App With GNU Make (UNIX Based OS: MacOS, Linux)

  • make run-app-with-setup : build docker and start all docker container with laravel setup
  • make run-app-with-setup-db : build docker and start all docker container with laravel setup + database migration and seeder
  • make run-app : start all docker container
  • make kill-app : kill all docker container
  • make enter-nginx-container : enter docker nginx container
  • make enter-php-container : enter docker php container
  • make enter-mysql-container : enter docker mysql container
  • make flush-db : run php migrate fresh command
  • make flush-db-with-seeding : run php migrate fresh command with seeding

Run App Manually

preview-docker-laravel

  • Create .env file for laravel environment from .env.example on src folder
  • Run command docker-compose build on your terminal
  • Run command docker-compose up -d on your terminal
  • Run command composer install on your terminal after went into php container on docker
  • Run command docker exec -it php /bin/sh on your terminal
  • Run command chmod -R 777 storage on your terminal after went into php container on docker
  • If app:key still empty on .env run php artisan key:generate on your terminal after went into php container on docker
  • To run artisan command like migrate, etc. go to php container using docker exec -it php /bin/sh
  • Go to http://localhost:8001 or any port you set to open laravel

Note: if you got a permission error when running docker, try running it as an admin or use sudo in linux

About

Laravel, MySQL, Nginx environment template with Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 70.4%
  • Blade 27.1%
  • Shell 1.1%
  • Other 1.4%