sinnbeck / laravel-served

Docker version of artisan serve (with alot more)
MIT License
74 stars 13 forks source link

Add means to pull DB_DATABASE, DB_USERNAME, DB_PASSWORD from .env #1

Closed iammikek closed 4 years ago

iammikek commented 4 years ago

I would like to make a change to allow the settings for DB etc to be pulled from .env rather than having to modify in config/served.php

can you add me as a user to this project so I can submit a pull request?

sinnbeck commented 4 years ago

@iammikek sounds like a fine idea. I would assume you can just fork and create a pr?

iammikek commented 4 years ago

Hi René

Great.

BTW you may recall via laracasts we changed the port in the config/served.php to use 3307. Oddly if I changed that in Laravel .env also to 3307 it throws an error:

SQLSTATE[HY000] [2002] Connection refused (SQL: select * from sessions where id = SZc444Pjbr519zPXOEcI2MOXPGuK025yMYb8EMwT limit 1)

As I’m relatively new to docker, I’ll exclude picking up that setting for now.

I’ll make a fork and then submit a PR this morning.

Cheers Mike

On 12 Sep 2020, at 09:28, René Sinnbeck notifications@github.com wrote:

@iammikek https://github.com/iammikek sounds like a fine idea. I would assume you can just fork and create a pr?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sinnbeck/laravel-served/issues/1#issuecomment-691444674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAXBGRBSZLF6OZ3DEPVP3TSFMWKJANCNFSM4RICRNNQ.

sinnbeck commented 4 years ago

@iammikek yeah it can be confusing. It works a bit like homestead. You use 3306 from inside laravel and 3307 from the database manager on your computer. Laravel is inside docker while your manager is outside https://laravel.com/docs/7.x/homestead#connecting-to-databases

https://github.com/sinnbeck/laravel-served#mysql

sinnbeck commented 4 years ago

Can this be closed?