Holle, I’m Li Bai!!
This is the end of the open source fad.
“Mood town https://raindays.cn“
“GitHub https://github.com/wsydxiangwang/Mood“
“Previous article https://juejin.cn/post/6845166890436788232“
Looking back at the last article, it was a bit sloppy, had a lot of shortcomings, and was a bit of an exaggeration of the name of the operating system for small white people
This time around, it’s all about new features, native development documentation, and optimized deployment
Welcome zhenxiang series Docker to the stage. Before, THE PM2 method was directly on after learning, and various installation and configuration were too tedious. But don’t panic, there is no problem, everything has a first time, the scenery along the way always good and bad ~
Now use Docker to deploy, completely a command line can deploy the successful way, as a frog in the well I give the big guys crazy praise ~
I spent a lot of days on and off. Learning tools is quite different from learning languages. “The only thing in common is the need for practical operation.”
Otherwise a basket of water in vain, head melon seeds a little buzz ~
It is also thanks to the last article and the students in the comments section that I got to know Docker and lost a lot of hair (I don’t know if I should thank 😭).
❝
I’m a cutto boy, why so miserable 😭😭
❞
Project deployment
According to this tutorial, even if you do not understand the code, you can also have their own website system, background Settings have been perfect, covering the normal blog function!!
- Pull the project Mood on GitHub
- Modify the
config
Inside the foldernginx.conf
File, need to specify their own domain name, there are notes in the file. - In the server directory, create
data
Folders as project directories - upload
web
,server
,config
Three folders anddocker-compose.yml
1 file. - Open the server terminal and install
docker
~ ~ (installation tutorial reference: https://docs.docker.com/engine/install/) - After the installation is successful, go to the one you just created
data
Directory, rundocker-compose up -d
To deploy - run
docker-compose ps
ordocker ps -a
See if it works perfectly
Ok, there you go. It’s that simple. “Docker awesome.”
The front desk website: http://aa.com, the back desk is: http://aa.com/admin, there is no problem ~~
“Draw key: enter the background first, set the basic information, the front desk can normal access, otherwise report an error, OK perfect, hurriedly go home to have a meal to celebrate celebrate ~~“
❝
Deployment in a word, docker really sweet 😍
❞
Docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose: docker-compose
Local development
-
First, you need to install the mongodb database on your computer and run the mongodb service.
-
Add the following content to the local hosts file:
127.0.0.1 web
127.0.0.1 server
127.0.0.1 mongoCopy the code
When docker is deployed, you need to connect containers with different host names, so you need to specify different project names!!
Beginners have not found a better way, if there is, welcome to give advice ~~
- Project initiation
npm install ## Each directory must
npm run dev ## web
npm run serve ## admin & server
Copy the code
- After this function is enabled, you need to enter the management background and fill in the information on the first screen to access the foreground normally. Otherwise, the foreground will report an error.
(the forehead… Here lazy did not do processing, there is no need to deal with 🧐)
- If you have “suggestions/optimizations/bugs”, please feel free to “Issues” or “email me”, thanks for your support!!
Realize the function
“The front desk page“
“The front desk page is not textured, we can directly look at my website https://raindays.cn“
This is my “mood town” or “mind station” that covers the functions of a mainstream blog
# page
# Article details (comment function
# Article list (summary of data
# phrase list (post it on moments
Subscribe to notifications (first thing you know
# Personal Introduction (Naive bravery # Rainy day page (peaceful or beautiful Copy the code
A total of 7 pages, is a relatively simple, normal personal website, above the function have, the animation transition has some, no fancy.
Although the sparrow has all the five organs, it completely shows a person’s emotions, heart, thoughts and income
“The background page“
Design is absolutely amazed at all of you (thinking: everyone here is xx😅)
Loyal to technology, I was forced to study design.
Do not know the students specializing in design have this feeling, no matter what things, will observe very carefully, perhaps is the vision, perhaps is the gap, perhaps xx…
Slowly feel their own requirements seem to be getting higher and higher, not only work, but also life, obsessive-compulsive disorder is getting bigger and bigger.
❝
Obsessive-compulsive work, maybe the project will be closer to perfection; Obsessive-compulsive disorder in life may make people know more about life!
❞
Background page, more features and page pictures, please refer to the previous article:
“Refer to the previous article https://juejin.cn/post/6845166890436788232“
“Mostly GitHub https://github.com/wsydxiangwang/Mood“
Idle talk
Imperceptibly, from the last article, fast a month has passed, time is always so, people caught off guard!!
Originally planned to be able to finish in half a month, the result is very disappointed with myself, gradually began to become lazy bed, the world of 5:30 in the morning has gone away from me ~~
Maybe this is a month of failure, a month of complete failure in some way, a month of life without expectations, a month of fear of disappointment
Now, the pressure formation drive has entered the right track, it is time to play up the spirit of ten thousand, come on ~~
This project comes to an end here, there are suggestions or optimization of the place, welcome to leave a message in the comment area, thanks ~~
Maybe there will be a lot of deficiencies, after all, no one is perfect, can not be comprehensive, so we need to support each other ~~
❝
Accept their own imperfections, is a kind of ordinary
❞
After all, the plan is still unable to catch up with the change, the unknown in life is always ever-changing, so that people have to yield to reality!
Now it’s time to prepare, join the front end talent pool and start looking for new directions and opportunities.
Wish you a bright future, wish good luck, love you all ~~