Skip to content

Latest commit

 

History

History
103 lines (73 loc) · 1.64 KB

README.md

File metadata and controls

103 lines (73 loc) · 1.64 KB

This is where your Laravel app goes

Add your Laravel project here (or create a new blank one).


Note: IF exist problems generate the project delete this README.md


Remember

The configuration of the database must be the same on both sides .

# .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=db_password
DB_ROOT_PASSWORD=secret
# source/.env
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=db_password

The only change is the DB_HOST in the source/.env where is called to the container of mysql:

# source/.env
DB_HOST=mysql

Help

A little help to create the project:

Make a new Project

docker-compose run --rm composer create-project laravel/laravel .

Copy Environment

cp .env.example .env

Install Libraries from Composer

docker-compose run --rm composer install

Install Libraries from Node

docker-compose run --rm npm install

Clear/Clean the project

docker-compose run --rm artisan clear:data
docker-compose run --rm artisan cache:clear
docker-compose run --rm artisan view:clear
docker-compose run --rm artisan route:clear
docker-compose run --rm artisan clear-compiled
docker-compose run --rm artisan config:cache
docker-compose run --rm artisan storage:link

Generate Keys

docker-compose run --rm artisan key:generate

Run migrations

docker-compose run --rm artisan migrate --seed

Run Passport (Optional)

docker-compose run --rm artisan passport:install