by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

Chat about the three stages of using D-Laravel, why use D-Laravel.
Because the configuration files used by D-Laravel are quite simple, it is very suitable for beginners of Docker to learn,
And users who don’t know how to use Docker can also use the ./console and ./create commands to create a project.

Remember, the author of D-Laravel (me) speaks Chinese, I believe you can get good support if you encounter problems.
Or study on your own, and you will grow.

If you are interested in learning about Docker, you can refer to my study notes
https://www.ccc.tc/article/4

In other words, I never knew Docker at all, and I only watched two official videos when I started learning Docker.
It took four hours, about six days and two days of practice, to understand him (docker-compose part),

Docker is not difficult to learn, including the swarm cluster architecture, don't be intimidated by the seemingly complicated files on the Internet.
I think the design concept of Docker is very similar to D-Laravel, they both hope to simplify things,
Laravel is not the same, so that there are so many users.

For those who want to learn Docker, you can watch some practical videos on Youtube. I mainly watch foreign videos, and it may be more interesting to take notes while watching.
If you can, please practice reading the official original documents. It is definitely easier to understand than the Chinese ones. At least I think so. This requires practice and getting used to it.

Three stages of D-Laravel:

The first stage:
1. The learning curve is extremely low. As long as you are a Mac user, it is strongly recommended that you give it a try.
Through the simple console command, quickly create and execute the container, and the create command can create multiple Laravel websites very efficiently, and complete the test database settings at the same time.

How much difference, take a look at this example:
Are you still manually building the test DB, like the one below?
create user
In the D-Laravel environment, the following command can be done in one line.
./create --db project100

second stage:
After adjusting the docker-compose.yml file by yourself, and getting more and more familiar with the use of docker and docker-compose,
Occasionally, the next official command will be used, such as docker-compose up -d, docker-compose down, docker-compose logs -f or docker-compose exec bash, etc.
I believe that at this time you are already an out-and-out Docker user, and you will also use the mixed state of ./console, ./create, and docker-compose.

Stage 3: (Enthusiast stage)
When you know docker-compose well, you can set the docker-compose.yml file arbitrarily,
It also allows D-Laravel to run on any platform (Windows, Linux, Mac or a Synlogy Nas),
I believe you can also make docker-compose.yml execute on any platform.

If you know how to use ./console and .env files, create a complex environment that executes multiple containers and multiple services.
I think at this stage, you should be very used to the ./console command, just enter ./console restart
You can see twenty or thirty platforms.
make a call
./console ps, running a bunch of customized services:


You should enter the docker-compose command without thinking, and at the same time feel that the ./console command is missing. When you are not used to it,
Then you have entered the third stage, thank you for your love of D-Laravel. :D

For those who don't know Docker the path will be like this...
1./console and ./create.
2. docker-compose
3. Returning to the original intention, the goal of D-Laravel is to be simple, returning to ./console and ./create again.

Tags: dlaravel docker

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


polymer,docker

D-Laravel supports index.html by default

D-Laravel's nginx environment settings support index.html by default, simply put Now, besides, D-Laravel can be used to run Laravel's Project, and it can also be used to run other Projects. Currently Apple's WebKit is already in preview for Service-Workers....

dlaravel

D-laravel has added the recommended opcache.ini settings

The latest version of D-Laravel has added opcache's recommended settings. The enabling method is very simple, please execute it in the D-Laravel directory.

docker, d-laravel, docker-compose, laravel

docker-compose loads multiple configuration files

We will use docker --network to establish multiple container interconnections, but if there are four containers, Is it necessary to issue docker run instructions for different containers four times, kill me, This article introduces the establishment of multiple containers at one time through the yaml file definition of docker-compose. Learn how to load multiple configuration files with the dokcer-compose -f parameter.