Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple Docker - Laravel 8 - MySQL - Redis - PHPAdmin - NGINX - PHP 7.4 - Composer - Artisan - XDebug

NotificationsYou must be signed in to change notification settings

supermavster/docker-laravel-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker

Image

A pretty simplified Docker Compose workflow that sets up a LEMP (Linux, NGINX, MySQL, PHP) network of containers for local Laravel development.

Ports

Ports used in the project:

SoftwarePort
nginx8080
phpmyadmin8081
mysql3306
php9000
xdebug9001
redis6379

Use

To get started, make sure you haveDocker installed on your system andDocker Compose, and then clone this repository.

  1. Clone this project:

    git clone https://github.com/supermavster/docker-laravel-8.git
  2. Inside the folderdocker-laravel-8 and Generate your own.env to docker compose with the next command:

    cp .env.example .env
  3. You needCreate orPut your laravel project in the folder source; to create follow the next instructionsHere.

  4. Build the project whit the next commands:

    docker-compose up --build

Remember

The configuration of the databasemust be the same on both sides .

# .envDB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=db_nameDB_USERNAME=db_userDB_PASSWORD=db_passwordDB_ROOT_PASSWORD=secret
# source/.envDB_CONNECTION=mysqlDB_HOST=mysqlDB_PORT=3306DB_DATABASE=db_nameDB_USERNAME=db_userDB_PASSWORD=db_password

The only change is theDB_HOST in thesource/.env where is called to the container ofmysql:

# source/.envDB_HOST=mysql

Special Cases

To Down and remove the volumes we use the next command:

docker-compose down -v

Update Composer:

docker-compose run --rm composer update

Run compiler (Webpack.mix.js) or Show the view compiler in node:

docker-compose run --rm npm run dev

Run all migrations:

docker-compose run --rm artisan migrate

About

A simple Docker - Laravel 8 - MySQL - Redis - PHPAdmin - NGINX - PHP 7.4 - Composer - Artisan - XDebug

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp