Skip to content

lamson-01/docker-compose-larave-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose configuration for Laravel

SERVER INFOMATION

  • Nginx
  • PHP 7.3
  • MariaDB
  • phpMyAdmin

RUN

docker-compose build
docker-compose up

# Attach shell
docker-compose exec php-fpm bash

Laravel Setup

composer install

cp .env.example .env

# Edit database configuration within .env file as below:
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laraveldb
DB_USERNAME=laraveluser
DB_PASSWORD=password

# Generate key
php artisan key:generate

# Migrate DB
php artisan migrate

Show result

Open web browser

  • Laravel: localhost:8000
  • phpMyAdmin: localhost: 8081

Good luck

Releases

No releases published

Packages

No packages published

Languages