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


docker,phpenv

Ran out of Docker IPv4 address pool problem solving

Maybe in the old version of the docker environment, when using Docker compose to start the container, you will encounter the following error: Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network This is actually this It is a symptom of running out of default-address-pools. In some environments, docker-compose will use the private network of Class B by default. The private IP of segment 172 has a range, from 172.16.0.0 to 172.31.255.255. That is to say, when we start a docker-compose Project, it will eat a private section of Class B, which is very heroic.

docker

About how to change the owner of FPM image on GCE

The CCC website has been upgraded to php 7.2.0. With a Docker environment, it is easy to upgrade php. There are still some precautions you should know about the change of Image on Linux. If you install D-Laravel on a Linux system through docker like me, when you change a different image, Perhaps you may encounter, doubt! Why composer does not have permission to write to the folder error. directory is not writable

dlaravel

D-Laravel's sublime plug-in can be installed by Package Control.

Mac or Linux users can now install the D-Laravel alias package from Sublime3's package control. Through D-Laravel alias, we can execute artisan and composer commands in the container in an easier way. In the docker environment, do you want to use composer to install the package? You don’t need to enter the container, or set the ce alias of composer, and you can execute it directly in sublime.