by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 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

Use docker in docker to build a D-Laravel test environment.

D-Laravel is an extremely easy-to-use and extremely flexible Laravel development environment. As long as you are a Mac user, even if you don’t know Docker, you can use it to create Laravel projects and develop them. Due to the newly added .env function When it comes to functions, those who are in a hurry push, but there is no complete test, and a bunch of new bugs are created. Therefore, this time, a new dlaravel_test, a bash testing tool, is added to run the test through docker in docker. Make sure that every release of D-Laravel can be a stable version.

dlaravel

How to automatically detect and update the certificate issued by let's encrypt through getssl

It's really great that let's encrypt provides free certificates. However, is it a bit troublesome to update the certificate every three months? This article introduces how to generate multi-domain SAN certificate settings through getssl, and schedule automatic certificate renewal. It's very simple, just six steps to get it done.

dlaravel

How to start supervisor on D-Laravel

Since queue workers are a long-running program, we need a program manager supervisor to monitor whether the process on the Linux system is running continuously. For example, when the queue:work operation fails, the queue:work process can be automatically restarted. Fortunately, D-Laravel has a built-in supervisor, so you don't need to install it yourself to use it. This article briefly introduces how we start the supervisor in the container.