- Notifications
You must be signed in to change notification settings - Fork113
supermavster/docker-laravel-8
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A pretty simplified Docker Compose workflow that sets up a LEMP (Linux, NGINX, MySQL, PHP) network of containers for local Laravel development.
Ports used in the project:
| Software | Port |
|---|---|
| nginx | 8080 |
| phpmyadmin | 8081 |
| mysql | 3306 |
| php | 9000 |
| xdebug | 9001 |
| redis | 6379 |
To get started, make sure you haveDocker installed on your system andDocker Compose, and then clone this repository.
Clone this project:
git clone https://github.com/supermavster/docker-laravel-8.git
Inside the folder
docker-laravel-8and Generate your own.envto docker compose with the next command:cp .env.example .env
You needCreate orPut your laravel project in the folder source; to create follow the next instructionsHere.
Build the project whit the next commands:
docker-compose up --build
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
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.