As a senior website operator, I am well aware of the importance of an efficient and secure content management system for enterprises and self-media.AnQiCMS (AnQiCMS) is our preferred choice for content deployment with its lightweight and high-performance features based on the Go language.In daily operations, we often need to quickly launch new sites, Docker combined with the 1Panel panel provides an extremely convenient solution.Next, I will elaborate on how to quickly deploy AnqiCMS application using Docker technology through the 1Panel panel.
Deploy AnqiCMS application quickly with 1Panel panel
In today's cloud service era, Docker containerization technology greatly simplifies the deployment and management of applications.Combine modern server operation and maintenance management panels like 1Panel, even operation personnel unfamiliar with command line operations can easily achieve the rapid deployment of AnqiCMS.The entire process revolves around creating an AnqiCMS Docker container and configuring reverse proxy in 1Panel.
Preparation: Installation of 1Panel and its配套 software
First, you need to install the 1Panel panel on the server.1Panel with its intuitive interface and rich features greatly facilitates our server management.https://1panel.cn/Install according to its detailed installation instructions. After installing 1Panel and successfully logging in, please be sure to go to its 'App Store' and install two key配套 software: OpenRestyandMySQL.OpenResty will serve as the web server and reverse proxy for our site, while MySQL is the core database for storing data in AnqiCMS.Ensure that these basic environments are ready is the prerequisite for the smooth deployment of AnqiCMS.
Create AnqiCMS container via Docker
After the installation of 1Panel and its accompanying software, we can start deploying the AnqiCMS application.In the left navigation menu of the 1Panel panel, click the 'Container' option, then select the 'Container' sub-tab, and click the 'Create Container' button.
In the pop-up container creation interface, we need to fill in some key information. First, in the "Name" field, I suggest you fill inanqicmsIn order to identify clearly. Then, in the "Image" configuration section, please check "Manual Input" and enter the official Docker image name of AnqiCMS in the adjacent input box:anqicms/anqicms:latest. This will ensure that we get the latest stable version of AnqiCMS.
Port configuration is an important step in Docker deployment. AnqiCMS container uses by default8001Port is running. Therefore, in the "Port8001. It is important to note that if you plan to deploy multiple AnqiCMS instances on the same server, the container ports for each instance will still remain8001But you must allocate a different, unused port for each instance on the 'server' port, such as8002/8003etc., to avoid port conflicts.
Continue scrolling down the page to find the 'Restart Strategy' settings.To ensure the stability of AnqiCMS service, it is recommended to choose 'restart after failure' or 'restart if not manually stopped', so that even if the application exits unexpectedly or the server restarts, AnqiCMS can automatically recover and run.Finally, click the "Confirm" button, 1Panel will start creating and launching your AnqiCMS Docker container.The entire process may take a few minutes, please be patient while the container is created.
Configure reverse proxy site
In the pop-up create website interface, select the "reverse proxy" type. In the "primary domain" field, enter the domain name you want to use to access the AnqiCMS site, for exampletest.anqicms.comEnsure that this domain name has been correctly resolved to your server IP address.
The next step is to fill in the 'proxy address'.Here you need to point to the IP address and port of the AnqiCMS Docker container we just created.127.0.0.1:8001Similarly, if you deploy multiple AnqiCMS containers and use different server ports, please fill in the corresponding ports according to the actual situation.
After confirming that all information is correct, click the "Confirm" button to complete the creation of the reverse proxy site.Until now, the Docker deployment and website configuration of AnqiCMS application have been completed.
Start the journey of AnqiCMS website
Now, you can access the domain name you have set through your browser, for examplehttp://test.anqicms.com/.When you first visit, AnqiCMS will guide you to the initial installation interface, where you need to configure database connection information, set up the back-end administrator account and password.Follow the steps on the screen to complete these steps, and your AnqiCMS site can be put into use.
The backend management address of AnqiCMS is:您的域名/system/For example, if your website ishttp://test.anqicms.com/then the back-end access path ishttp://test.anqicms.com/system/Please be sure to keep your backend account and password safe, and update them regularly to ensure website security.
Frequently Asked Questions (FAQ)
1. I deployed AnqiCMS on 1Panel, but it shows a blank page or fails to connect when accessed through the domain name. How can I troubleshoot it?First, please check if your domain has been correctly resolved to the server IP.Next, confirm that the AnqiCMS container is running normally in 1Panel, you can check its status on the "Container" page.127.0.0.1:8001.Finally, check the server firewall or security group settings to ensure that the 80/443 ports (if you have configured HTTPS) and the AnqiCMS container server port (such as 8001) are open.
How to deploy multiple AnqiCMS sites on a single server?You need to create a separate Docker container for each AnqiCMS instance that you want to deploy.The internal port of each container remains 8001, but when creating a container, a different "server port" should be assigned to each container (for example, the first 8001, the second 8002, the third 8003, and so on).Later, create an independent reverse proxy site for each AnqiCMS instance in 1Panel, pointing different domains to the corresponding server ports of each AnqiCMS container.In addition, during the initialization installation of AnqiCMS, each site needs to be configured with a separate database name to avoid data confusion.
3. Where is the database information of the AnqiCMS container configured? Can I not use the MySQL installed by 1Panel?The database information of AnqiCMS is filled when you first access the website through a browser for initial installation. You need to provide the address of the MySQL server (usually127.0.0.1Because the 1Panel MySQL container is usually on the same network as the AnqiCMS container), database name, username and password.Yes, you can use MySQL without installing it from the 1Panel app store, as long as you have another available MySQL database (such as an external database service or manually installed MySQL), you just need to provide the correct connection information during the AnqiCMS initialization.Ensure the database user has the permissions to create and manage the database.