As a website operator who is well-versed in the security CMS, I fully understand the importance of efficient deployment for enterprise content management.AnQiCMS with its efficiency in Go language, flexible customization capabilities, and easy scalability, has become the ideal choice for small and medium-sized enterprises and content operation teams.While combining Docker technology, the deployment experience of AnQiCMS has been significantly improved, especially with the assistance of panels like 1Panel or aaPanel, making the entire process more convenient and efficient than ever.

The advantages of Dockerizing AnQiCMS deployment

AnQiCMS as an enterprise-level content management system developed based on the Go language, is inherently capable of high performance and high concurrency.Wrap it into a Docker container for deployment, further strengthening these advantages and introducing additional convenience.Docker provides a lightweight, portable, and self-sufficient runtime environment, packaging AnQiCMS and all its dependencies together to ensure consistent performance of the application across different server environments.This means that whether you are in the development, testing, or production environment, AnQiCMS can run in the same way, greatly reducing the problem of 'It works on my machine'.

Moreover, Docker's containerization feature brings excellent isolation.Each AnQiCMS instance runs in an independent container, which does not interfere with each other, thus enhancing the security and stability of the system.For applications like AnQiCMS that emphasize content security, anti-crawling, and watermark management, container isolation is undoubtedly an additional safeguard.At the same time, Docker also simplifies the expansion and upgrade process of AnQiCMS.Whether it is horizontal scaling to cope with high traffic or version iteration updates, it can be completed quickly without affecting other services, which is consistent with the concept of AnQiCMS modular design.Combine with management panels like 1Panel or aaPanel, deploying and managing these Docker containers becomes more intuitive and user-friendly, even for non-technical operators who can easily get started.

The process of deploying AnQiCMS using 1Panel

1Panel provides a modern Web interface for managing servers and Docker containers, making the deployment of AnQiCMS very intuitive.

Firstly, you need to install 1Panel on the server. The official website of 1Panel ishttps://1panel.cn/)provided detailed installation instructions, please select the appropriate command for installation according to your server operating system.After installation, it is recommended to install OpenResty (as a replacement for Nginx, used for reverse proxying) and MySQL (as a database service) in the 1Panel app store.

When 1Panel and its required software are ready, you can start deploying the AnQiCMS container.Navigate to the "Container" section in the left menu of 1Panel, select the "Container" tab, and then click the "Create Container" button.In the pop-up configuration interface, you need to fill in the basic information of the container: In the "Nameanqicms/anqicms:latestIn the "Port" settings, select "Expose Port", and set both the "Server Port" and "Container Port" to8001It is worth noting that,8001Is the default port listened by the AnQiCMS container. If you plan to deploy multiple independent AnQiCMS containers on the same server (instead of using the built-in multi-site feature of AnQiCMS), the 'server port' of each AnQiCMS container needs to be set to a different port number, for example8002/8003English, but the 'container port' is always kept8001Unchanged. Continue scrolling down, in the "Reboot Policy" section, you can choose "Reboot after failure" or "Reboot if not manually stopped" to ensure that the AnQiCMS service can automatically recover after an unexpected stop. Finally, click the "Confirm" button, 1Panel will start creating and launching the Docker container for AnQiCMS.

Container creation successful, the next step is to configure reverse proxy to access your AnQiCMS website through the domain name.In the 1Panel left menu, select the "WebsiteIn the pop-up interface, select the 'Reverse Proxy' option.test.anqicms.com. Fill in the 'proxy address' field127.0.0.1:8001.Here the IP address points to the local server, and the port number corresponds to the 'Server Port' setting of your AnQiCMS container.8002),and the corresponding port should also be filled in here. Click 'Confirm' to complete the creation of the site.

Complete the above steps and you can enter the domain name you configured in the browser (for examplehttp://test.anqicms.com/)to access AnQiCMS.First time access, the system will guide you to the initial installation interface, where you need to complete necessary steps such as database configuration and administrator account settings.您的域名/system/.

The practice of deploying AnQiCMS using aaPanel

aaPanel (BaoTa International Edition) is also a widely popular server management panel, which supports Docker deployment and provides a convenient graphical user interface.

Firstly, make sure that your server is installed with aaPanel. If you have not installed it yet, please visit the aaPanel official website (https://www.aapanel.com/new/download.html),根据指引获取安装命令并在服务器上执行。

Docker environment is ready, you can install AnQiCMS through the 'App Store' of aaPanel.In the aaPanel control panel, navigate to the Docker management interface, and then click on "App Store.Enter 'AnQiCMS' in the search box to search.In the search results, find AnQiCMS, click the "Install" button to enter the installation configuration interface.8001. This8001Is the default port inside the AnQiCMS container.Click "Confirm" to start the installation.The installation process may take 1-5 minutes, please be patient.If an error occurs during installation, please check the error prompt and try clicking the "Restart" button to reinstall.If the automatic installation fails to configure the reverse proxy successfully, you may need to set it up manually.127.0.0.1:8001(or any other port you have configured for the AnQiCMS container).

AnQiCMS via aaPanel's Docker one-click deployment usually pre-installs the website and sets default credentials. Default admin account:adminDefault admin password:123456Back-end access address:您的域名/system/For example, if your website domain ishttp://test.anqicms.com/If so, the back-end access address is:http://test.anqicms.com/system/. After the first login, it is strongly recommended that you change the default administrator account and password immediately to ensure website security.

Docker environment AnQiCMS multi-site management

AnQiCMS itself has powerful multi-site management functions, which are also applicable in the Docker environment and are more centralized and efficient.Deploy an AnQiCMS Docker container instance on a server to host multiple independent websites at the same time.

The core principle is that all requests for external domains are forwarded to the same AnQiCMS Docker container through reverse proxies on the server (such as Nginx, OpenResty, etc., configured by 1Panel or aaPanel)8001Port.AnQiCMS container receives a request and then identifies which site to provide the corresponding website content based on the domain name (identified through the HTTP Host header).

To add a new site on Dockerized AnQiCMS: First, configure reverse proxy for the new domain in your 1Panel or aaPanel. Point the new domain to the server port of the AnQiCMS Docker container (usually127.0.0.1:8001)。Next, log in to the backend management interface of the AnQiCMS main site you have deployed.Find the "Multi-site Management" feature in the left menu.

  • Site NameEnglish for background recognition, can be customized.
  • Site Root DirectoryEnglish should be followed by this path./app/Start with English, followed by a directory named based on the new domain name (for example, change the period in to underscore, becoming)new.anqicms.comEnglish to replace the dot with an underscore, becoming/app/new_anqicms_com),used to store independent cache data for this site, ensuring it does not repeat with other site directories.
  • Website address:The complete URL of the new site, for examplehttp://new.anqicms.com.
  • Administrator account password:Set the login credentials for the new site's backend.
  • Database name:Specify a new database name for the new site, and it is recommended to name it based on the domain name (for examplenew_anqicms_com).
  • Database information reuseEnglish: Since AnQiCMS Docker container is usually used with a MySQL Docker container, you can choose to reuse the main site's database connection information, and AnQiCMS will automatically create the table structure in the new database.
  • Select the template to useSelect a default template for the new site.

Click "OK" to complete the creation of the new site. You can directly enter the admin panel of the new site by clicking the "Visit Backend" button in the multi-site management list, or directly access the new domain name in the browser and add/system/This approach avoids the resource overhead of copying AnQiCMS code and starting an independent container for each site, achieving efficient multi-site hosting.

Concluding remarks

Through Docker combined with 1Panel or aaPanel to deploy AnQiCMS, both content operation teams and small and medium-sized enterprises can obtain a high-performance, secure, and easy-to-manage content publishing platform with the lowest technical threshold.This modern deployment method not only simplifies the initial setup, but also lays a solid foundation for future expansion and maintenance, allowing you to focus more on high-quality content creation and website operation, thereby attracting and retaining your users.


Common Questions and Answers (FAQ)

Q1: How to deploy multiple independent AnQiCMS Docker container instances on the same server instead of using the built-in multi-site feature of AnQiCMS?

A1:If you want to deploy multiple completely independent AnQiCMS Docker containers (each container with a database and an independent AnQiCMS application), rather than using AnQiCMS's built-in multi-site feature to manage multiple logical sites within a single container, you need to allocate different 'server ports' and independent MySQL databases to each AnQiCMS container when creating them. For example, the server port of the first AnQiCMS container is8001And connectmysql_db1, the server port of the second container is8002And connectmysql_db2。Then, you need to configure independent reverse proxy for each AnQiCMS instance in 1Panel or aaPanel, and point the respective domains (such assite1.comandsite2.com) separately to127.0.0.1:8001and127.0.0.1:8002.

Q2: AnQiCMS Docker deployment cannot access the website or backend, what could be the reason?

A2:The possible causes of access issues may vary. First, please check if the firewall (such asufwor security group settings) for the access you use for website access have been opened.80and443Port, as well as the "server port" mapped by the AnQiCMS Docker container (such as8001)。其次,confirm whether the reverse proxy configuration is correct, whether the domain has been resolved to the server IP, and whether the target address of the reverse proxy points to the correct IP and server port of the AnQiCMS container (usually