Detailed explanation of how to quickly build a blog website using Docker

Detailed explanation of how to quickly build a blog website using Docker

Halo is a modern personal independent blog system, providing an additional option for students who are accustomed to blogging.

Official website: https://halo.run/

1. Preparation

This tutorial is based on Docker, so you need to install the Docker environment on the server in advance.

Docker installation tutorial: https://www.jb51.net/article/94067.htm

2. Deployment Process

(1) Create a working directory

mkdir ~/.halo && cd ~/.halo 

(2) Download the configuration file to the working directory

wget https://dl.halo.run/config/application-template.yaml -O ./application.yaml 

(3) Modify the configuration file, configure the database or port, etc.

vim application.yaml 

(4) Pull the blog mirror source

docker pull halohub/halo:1.4.13 

(5) Create a container

docker run -it -d --name halo -p 8090:8090 -v ~/.halo:/root/.halo --restart=unless-stopped halohub/halo:1.4.13

Parameter explanation:

  • -it: Enable input function and connect pseudo terminal
  • -d: Run the container in the background
  • --name: Specify a name for the container
  • -p: port mapping, the format is主機(宿主)端口:容器端口, which can be configured in application.yaml .
  • -v: Working directory mapping. The format is: -v host path:/root/.halo, the latter cannot be modified.
  • --restart: It is recommended to set it to unless-stopped to automatically start the Halo container when Docker starts.

(6) Open http://ip:端口號to see the installation guide interface.

For example, my service public network IP is: 81.71.136.94, so the address I visit is: http://81.71.136.94:8090/

After filling in the information, click Install. After the installation is complete, you will be redirected to the login page.

Enter your account and password and click Login to enter the blog backend management interface.

Click Jump to Home Page to go directly to the blog home page.

3. Access Test

Visit: http://81.71.136.94:8090/ (need to change to your own server IP address~)

This is the end of this article about how to quickly build a blog website with Docker. For more relevant content about building a blog website with Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

<<:  Let me teach you how to use font icons in CSS

>>:  js implements array flattening

Recommend

How to expand the disk space of Linux server

Table of contents Preface step Preface Today I fo...

Write a dynamic clock on a web page in HTML

Use HTML to write a dynamic web clock. The code i...

Solution to the docker command exception "permission denied"

In Linux system, newly install docker and enter t...

An Uncommon Error and Solution for SQL Server Full Backup

1. Error details Once when manually performing a ...

Computed properties and listeners details

Table of contents 1. Calculated properties 1.1 Ba...

An article to solve the echarts map carousel highlight

Table of contents Preface toDoList just do it Pre...

Some improvements in MySQL 8.0.24 Release Note

Table of contents 1. Connection Management 2. Imp...

How to use JavaScript to get the most repeated characters in a string

Table of contents topic analyze Objects of use So...

How to quickly modify the table structure of MySQL table

Quickly modify the table structure of a MySQL tab...

Steps to completely uninstall the docker image

1. docker ps -a view the running image process [r...

Implementation of React page turner (including front and back ends)

Table of contents front end According to the abov...

MySQL uses find_in_set() function to implement where in() order sorting

This article introduces a tutorial about how to u...

Data storage implementation method in WeChat applet

Table of contents Global variable globalData Page...