by Devin Yang
(This article was automatically translated.)

Published - 8 years ago ( Updated - 8 years ago )

The docker-compose.yml configuration file has been adjusted to use the latest PHP php7.2.1 image.

1. Change the image generation method of fpm, optimize dockerfiles/fpm/php7.x/Dockerfiles, and make it easier to set and adjust the extension package.

2. Through docker-compose-build.yml, in the Project directory of D-Laravel,
Directly build your own Image and adjust the required kit, please refer to the content description of this file.

Adjustment: image and path in docker-compose-build.yml, and then enter
./console build to create your own image.

Or use the official instructions, the following needs to be executed in the D-Laravel directory to create a php image of version 7.1, and the image name is called myfpm (please set the name you want to use yourself).
docker build -t myfpm dockerfiles/fpm/7.1

3. Add dlaravel-swarm.yml (experimental), for example, you want to build a high-availability cluster environment on the Production host. (advanced operation)
For example, you need to adjust related fpm settings such as etc/default.conf by yourself, because in Docker's swarm mode, docker-compose.yml does not support using networks_mode.

4. The new image adds additional and more php plug-in settings for advanced users to operate.
You can go to view and copy the settings to the directory of dlaravel/etc/php to enable it.

Note: D-Laravel's simple console command does not support PostgreSQL, so if you use PostgreSQL,
You need to use the official Docker instructions to create the container.
sample/php/samples.ini
For example you want to use:
PDO Driver for PostgreSQL



Incompatible changes:
The default php mount changes of dockr-compose:
The path of fpm has been changed from php to conf.d, that is to say, you can go to the etc/php/ directory under the D-Laravel directory and put your own php *.ini file.
Old: - ./etc/php:/usr/local/etc/php
New: - ./etc/php:/usr/local/etc/php/conf.d

If the D-Laravel you are using works well, you don’t need to update it. If you want to use the latest version of PHP for development,
It is recommended to download a new installation, and then copy the database data and sistes folders to the new dlaravel to test whether it is normal.

The old version of D-Laravel uses the new version of fpm image, PHP 7.1.2, 7.1.13 or 7.0.27.
Please remember to add the php extension module to php.ini in the directory of dlaravel/etc/php, otherwise the operation will be abnormal.
extension=zip.so
extension=pdo_mysql.so

In addition, please make sure that your PHP fpm service container has mounted this path:
- ./etc/php:/usr/local/etc/php/conf.d

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...

docker,dlaravel

D-Laravel 1.5.5 Change Notes

D-Laravel's fpm image was rebuilt using the official dockerfile of docker php before php 7.2.1. And so I can specify that the default owner of fpm is dlaravel, --with-fpm-user=USER Set the user for php-fpm to run as. (default: nobody) --with-fpm-group=GRP Set the group for php-fpm to run as.

dlaravel

Super easy to use HTML to PDF kit mpdf introduction

During development, will it be necessary to output HTML to PDF? This video introduces how to output PDF on the screen through the mpdf library of php.