How to install and deploy AnQiCMS using 1Panel in Docker environment?
As an experienced website operations manager, I am well aware of the importance of an efficient, stable, and easy-to-manage content management system (CMS) for corporate websites.AnQiCMS, with its lightweight and efficient features of the Go language, as well as its rich functional modules, has become the first choice for many small and medium-sized enterprises and content operation teams.In modern operations and maintenance environments, Docker containerization technology combined with a visual management panel like 1Panel can greatly simplify the deployment process and improve management efficiency.
Next, I will give you a detailed introduction on how to easily install and deploy AnQiCMS using the powerful 1Panel in the Docker environment, so that your website can go online quickly.
Preparation for Docker deployment of AnQi CMS
Before starting to deploy Anqicms, we need to ensure that the server is installed with the 1Panel management panel. If you have not installed 1Panel yet, please visit its official websitehttps://1panel.cn/According to the detailed instructions provided, complete the installation process. 1Panel provides a convenient graphical interface for Docker container management, making complex command operations intuitive.
In addition, the operation of AnQi CMS also requires a database service, MySQL is usually recommended.In the 1Panel app store, you can easily find and install the necessary components of OpenResty and MySQL.OpenResty will serve as the foundation for our reverse proxy service, while MySQL provides the secure CMS data storage.
Create a safe CMS container with 1Panel
After completing the preliminary preparation, we can start creating the Docker container for AnQi CMS.Log in to the 1Panel panel, navigate to the 'Container' section through the left menu, select the 'Container' tab, and click the prominent 'Create Container' button.
In the pop-up creation interface that appears, first name your Anqi CMS container, for example, you can fill in 'anqicms'. Next, select 'Manual input' in the image configuration, and then type in the official Docker image address of Anqi CMS.anqicms/anqicms:latest. This ensures you are using the latest version of Anqi CMS.
In terms of port settings, select 'Expose Port'. Fill in the server port and container port.8001. Please note that if you plan to deploy multiple AnQiCMS instances on your server, each instance needs to occupy a different server port, for example8002/8003But the ports inside the container are always maintained8001This ensures the uniformity inside the container, while distinguishing different instances through the host port.
Scroll down the page to find the restart rule settings. We recommend selecting the 'Restart after failure' or 'Restart if not manually stopped' options to ensure the continuous stable operation of the service.This way, even if the service is interrupted unexpectedly, Docker can automatically attempt to recover, reducing manual intervention.
Finally, click the "Confirm" button, 1Panel will automatically complete the creation process of the AnQiCMS container. Please wait a moment, until the container status becomes running.
Configure reverse proxy to access the AnQi CMS via domain name
After the container is successfully created, we need to configure a reverse proxy for Anqicms so that it can be accessed through a domain name instead of an IP address and port number, which is crucial for SEO and user experience.
In the left menu of 1Panel, click the 'Website' option, select the 'Website' tab, and then click the 'Create Website' button.In the pop-up options, select the "Reverse Proxy" mode.
In the main domain field, enter the domain name you wish to use to access AnQi CMS, for exampletest.anqicms.com. Next, enter the proxy address127.0.0.1:8001Similarly, if you have deployed multiple AnQiCMS containers and used different server ports, the proxy address here needs to be adjusted according to the actual server port allocated to the AnQiCMS container.
Confirm all settings are correct, click the "Confirm" button to complete the creation of the reverse proxy site.At this time, 1Panel will automatically configure Nginx and other reverse proxy services to forward external domain requests to the 8001 port of your AnQiCMS container.
Initialize AnQi CMS and start operating your website
Now, all deployment work is ready. You can enter the domain name you previously set in the browser, for examplehttp://test.anqicms.com/The system will guide you to the initial installation interface of AnQi CMS.On this page, you need to configure the database connection information, create an administrator account and password, and set the basic information of the website.
After completing the installation steps, your Safe CMS website can be accessed normally. The address for the backend management interface is您的域名/system/. For example, if your website domain ishttp://test.anqicms.com/then the back-end access path ishttp://test.anqicms.com/system/. After the first login to the backend, please be sure to change the default administrator account and password to ensure the security of the website.
Congratulations! You have successfully installed and deployed AnQiCMS using 1Panel in the Docker environment.Now, you can fully enjoy the convenient content management experience brought by Anqi CMS, attracting and retaining your users by publishing high-quality content.
Frequently Asked Questions (FAQ)
How do I deploy multiple AnQiCMS website instances on the same server?The key to deploying multiple AnQiCMS website instances is to assign a different host port to each Docker container and to configure independent reverse proxies for each instance in 1Panel. For example, the port of the first instance container port
8001Mapped to the host8001Reverse proxy points to127.0.0.1:8001; The second instance container port is still8001but can be mapped to the host8002and reverse proxy points to127.0.0.1:8002. Different domain names access their independent AnQiCMS containers through different host machine ports.What databases does AnQiCMS support?AnQiCMS mainly supports MySQL database.When deploying on Docker, it is recommended to install the MySQL service in the 1Panel app store.It is recommended to use MySQL 5.6.35 or a higher version to ensure compatibility and performance.
What are the outstanding advantages of AnQiCMS in content management?AnQiCMS is committed to providing an efficient, customizable, and scalable content management solution.Its highlights include multi-site management capabilities, allowing for the unified management of multiple independent sites;Flexible content model, can be customized according to business requirements;A comprehensive SEO toolkit, such as static pseudonym, 301 redirection, Sitemap generation, keyword library management, etc., helps improve the search engine performance of the website;In addition, it supports multilingual, content collection and batch import, as well as powerful permission control and security mechanisms, providing comprehensive support for website operations.