Skip to content

aboutjubair/docker-laravel-local-env

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Docker Local Dev Setup

This package provides an easy way to quickly set up php development server with docker. The advantage is you can use multiple project with the same setup.

Requirements

The current package requirements are:

  • Docker engine
  • Docker compose

Installs

  • nginx
  • php8.1
  • php7.4
  • mariadb:latest

You can install your required version easily.

Instalaltion Steps

  • Create src directory.
  • In the src directory create your project directory
  • In nginx conf.d create virtual domain
  • All projects will be at /var/www directory in nginx container
  • docker compose up -d

Commands inside container

docker exec -it -w /var/www/project_id php8.1-container-name pwd

ENV DB Connection

DB_CONNECTION=mysql
DB_HOST="mysql_db"
DB_PORT=3306
DB_DATABASE=db_name
DB_USERNAME=root
DB_PASSWORD=root

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%