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,laravel

[D-Laravel]./console node

When developing Laravel, sometimes we need to install nodejs packages through npm, but Node in our system is not new enough. It may be impossible to upgrade due to some factors, such as running an old version of nodejs program, etc. In fact, we can use docker through simple commands, so that we can use the latest version of node image to mount the /sites folder on the host side. In this way, we can execute the new version of the npm command at any time.

d-laravel, docker, laravel, docker-compose

D-Laravel v1.0.0 release change description

In order to allow the container to be used more flexibly, D-Laravel has released version v1.0.0, which is not backward compatible. https://github.com/DevinY/dlaravel/releases/tag/v1.0.0 If you are using before v1.0.0, you need to modify the .env file of the Laravel project, change DB_HOST=127.0.0.1 to DB_HOST=db If you have a custom docker-compose-custom.yml file....more

docker

Command to remove all docker containers and docker images

Sometimes I tried a bunch of containers or images in my own environment, how to remove all images and containers in the system? These instructions are provided for your reference..