by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 years ago )

This article explains about the .env settings on D-Laravel
MYSQL_ROOT_PASSWORD=secret
LARAVEL_INSTALLER='container'
DOCKER_SERVICES='docker-compose.yml service/redis.yml'

Under the directory of D-Laravel, there is a hidden file of .env.example.
We can change the name to .env through cp .env.example .env, and the bash of ./console or ./create will detect the function settings in .env.

The following describes these settings:
1. MYSQL_ROOT_PASSWORD=secret
If we want the mysql we use in Dlaravel to have a set password, we can make this change.
At the same time, the MYSQL_ROOT_PASSWORD annotation in docker-compose.yml should be removed.
When the parameters here are present,
1. When we enter ./console mysql , bash will add the -p parameter, so a screen asking for a password will pop up.
2. Since the root of mysql has already set a password, the setting here also allows us to build the database required by the Project when ./create project is used normally.
3. When starting for the first time, docker-compose.yml can also refer to the settings here to create a root password.
If the mysql on D-Laravel does not set the root password, you don’t need this setting, just delete the whole line.

2. LARAVEL_INSTALLER='container'
When .env has this setting, ./create [Project] allows the bash of ./create to understand that we need to use the laravel installer command in the container or on the host side to install the Laravel Project.
LARAVEL_INSTALLER='host' (Your system needs to have php, composer and laravel installer installed)
LARAVEL_INSTALLER='container'

3. DOCKER_SERVICES='docker-compose.yml service/redis.yml'
Multiple docker-compose structure language configuration files can be loaded through this setting.

Tags: dlaravel

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


dlaravel

D-Laravel released v1.1.5

In response to the launch of Laravel 5.5, PHP also released PHP 7.0.23 and PHP 7.1.9. The fpm version used by D-Laravel is also updated...just adjust the version defined by your docker-compose You can use the latest php...

dlaravel

How to directly execute the php artisan of different projects in the container on the host.

This article is the application teaching of D-Laravel, how to directly execute php artisan in the container on the host side. After customizing the alias, you can directly execute php artisan in the contianer in the project folder on the host side. alias a="../../artisan.sh"

nginx,dlaravel

How to configure HTTPS on nginx to get an SSL A+ score from Qualys

This article describes how to adjust the ssl settings of nginx so that the website can obtain an SSL report and get an A+ rating. Here I am using letsencrypt free credentials. As long as you use the official Docker nginx new version image preset by D-Laravel, you should be able to achieve the same effect as mine. You can check your host SSL settings through the following. https://www.ssllabs.com/ssltest/index.html