As a website operator who is deeply familiar with the operation of AnQiCMS, I am well aware of the importance of an efficient and stable content management system for the development of a company.AnQiCMS with its high-performance architecture based on the Go language, flexible content model, and SEO-friendly design, provides an excellent solution for small and medium-sized enterprises and content operation teams.It is committed to making website deployment simple, running safely, with an elegant interface, and having extremely fast execution speed, effectively avoiding many potential security issues.

For many operators, deploying and managing a CMS system on a server, especially when involving Docker container technology, may seem somewhat complex.It is fortunate that with the help of popular server management panels like aaPanel (Baota Panel International Edition) or Baota Panel, the one-click deployment process of AnQiCMS using Docker has become extremely simple.Next, I will elaborate on how to easily deploy AnQiCMS through Docker on these panels.

Deploy AnQiCMS on the aaPanel dashboard

aaPanel, also known as Baota Panel International Edition, provides a consistent panel management experience for users worldwide.Deploy AnQiCMS on aaPanel, we first need to ensure that the panel itself is installed correctly.If you have not installed aaPanel yet, please visit its official website to get the latest installation instructions and follow the instructions to complete the installation on your server.

When deploying the AnQiCMS application, we need to use the Docker feature of aaPanel.After installing aaPanel, please navigate to the "Container" option in the left menu and select the "Container" tab page.Click the 'Create Container' button, a new configuration interface will pop up.Here, you need to enter in the “Name” fieldanqicmsAs a container name. In the "Image" section, select "Manual input" and then enter the Docker image address of AnQiCMSanqicms/anqicms:latest. Port configuration is crucial, please set both the 'server' and 'container' ports in the 'Exposed Ports' section to8001If you plan to deploy multiple AnQiCMS instances on the same server, the server port of subsequent instances should be incremented sequentially, for example8002/8003but the container port should remain consistent8001Continue scrolling down, at the 'Restart Rules' section, it is recommended to select 'Restart after failure' or 'Restart if not manually stopped', to ensure the continuous availability of the service.Finally, click the "Confirm" button and the creation of the Docker container will begin.

After the container is created, we need to configure the website's reverse proxy to access AnQiCMS via the domain name.Please click on the "Website" menu on the left, then select the "Website" tab page, and click the "Create Website" button.In the pop-up window, select the 'Reverse Proxy' type. Enter the domain name you have prepared for the AnQiCMS website in the 'Primary Domain' field, for exampletest.anqicms.comAnd the proxy address should be filled in127.0.0.1:8001The port here must match the server port you previously configured for the AnQiCMS Docker container.After completing these settings, click "Confirm" to create a reverse proxy site.

Now, you can enter the domain name you have configured in the browser, for examplehttp://test.anqicms.com/Come visit the initialization installation interface of AnQiCMS.After completing the database information and administrator account settings according to the prompts, your AnQiCMS website can be put into use.The backend management address is usually added after your domain/system/For examplehttp://test.anqicms.com/system/.

Deploy AnQiCMS on the Baota panel

For domestic users, Baota panel provides the same convenient deployment experience.Please note that the Docker deployment feature is usually applicable to Baota Panel version 9.2.0 and above. It is recommended that you upgrade the panel to version 9.5.0 or higher to achieve **compatibility.**If you have not installed Baota panel yet, please go to its official website, copy the recommended universal installation script, and execute the installation on the server.

Before installing AnQiCMS, we first need to install the MySQL database in the Docker environment.Find the "Docker" option in the left menu of the Baota panel (if not displayed, go to "Panel Settings" to enable it), click to enter, and if prompted to install Docker, click "Install Now".After installing the Docker service, search and install MySQL in Docker's app store.In the case of server memory below 2GB, it is recommended to choose MySQL 5.6 version, otherwise, the default installation of 5.7 version is sufficient.When installing, be sure to check the 'Allow external access' option. After installation, click the 'Details' link of MySQL, copy the password of the root user, as it will be used later when deploying AnQiCMS.

Continue, search in Docker's app storeanqicmsAfter finding the results, click the 'Install' button to enter the installation interface. On the installation interface, you need to fill in the following key information:

  • Website domainFor examplewww.anqicms.com.
  • Database name: Default toanqicms. If you plan to deploy multiple AnQiCMS instances, each instance requires a unique database name, please modify it, for exampleanqicms_site2.
  • Database passwordEnter the root user password that you previously copied from the Docker version of MySQL details.
  • Port: Default to8001Similarly, if you deploy multiple instances, please allocate a different port number for each instance, such as8002/8003etc.

Click "OK" to start deploying AnQiCMS.This process usually takes 1 to 5 minutes, please be patient.After the deployment is successful, you can enter the domain name you set in the browser as you would on aaPanel and add/system/To access the AnQiCMS backend management interface, for examplehttp://dev.anqicms.com/system/The default administrator account isadmin, and the password is123456It is strongly recommended that you change these default credentials immediately after your first login to enhance security.

Bt panel multi-site deployment AnQiCMS advanced

Sometimes, you may need to run multiple websites on the same server using the same Docker AnQiCMS container.This can be achieved through the reverse proxy function of Baota panel and the built-in multi-site management function of AnQiCMS.

First, navigate to the "Website" menu on the left side of the Baota panel, select the "Reverse Proxy" tab page, and click "Add Reverse Proxy". In the pop-up window, enter the domain name of the new site you need to add, for example,newsite.anqicms.com. The target URL points to your AnQiCMS Docker container, usuallyhttp://127.0.0.1:8001. Click 'OK' to complete the creation of the reverse proxy site.

Next, log in to the AnQiCMS backend that you have deployed (usually the first deployed site, as it has multi-site management permissions), find and click on "Multi-site Management" in the left menu, and then click the "Add New Site" button. In the new site configuration interface, you need to fill in the following information carefully:

  • Site name: Fill in accordance with the actual situation to distinguish.
  • Site root directory: Considering that AnQiCMS is deployed in a Docker container, the default root directory is/app/. To ensure the independent storage of new site data, you need to create a unique subdirectory on this basis, for example/app/newsite_anqicms_com. Note that the dots in the domain name are usually replaced with underscores.
  • website addressEnter the full domain name you have configured for the new site, for examplehttp://newsite.anqicms.com.
  • Administrator account passwordSet up an independent administrator account and password for the backend of the new site.
  • Database nameSimilarly, assign a unique database name for the new site, for examplenewsite_anqicms_com.
  • Duplicate database information: Since AnQiCMS is deployed in the Docker environment, you can usually directly select 'Reuse default database account information', because the AnQiCMS container has access permissions to its internal MySQL.
  • Select the template to use: Select a default template for the new site.

After clicking the "OK" button, the new AnQiCMS site will be created. You can directly enter the background management interface of the new site through the "Visit Background" button in the multi-site management list, or directly enter the domain name of the new site in the browser and add/system/Visit.

By following these steps, no matter which aaPanel or Baota panel you choose, you can easily achieve the Docker deployment and management of AnQiCMS, making your content operation work more efficient and convenient.

Frequently Asked Questions (FAQ)

1. How to handle the situation where the Docker container fails to start or cannot be accessed when deploying AnQiCMS?If the Docker container fails to start, first check if the Docker service is running normally.Next, check the container logs, which are usually where you can find error information, such as port conflicts, failed image pulls, or configuration errors.If the port is occupied, you can uselsof -i:{端口号}Command (Linux system) find and end the process occupying the port.If it is the first installation, make sure that the MySQL database is installed correctly, especially that the root password is correctly provided to AnQiCMS.Finally, make sure that the proxy address and port in the reverse proxy configuration match the actual address and port that the Docker container is listening on.

How to deploy multiple AnQiCMS instances on a single server with each instance having an independent database?On Baota panel or aaPanel, deploy an independent Docker container for each AnQiCMS instance and ensure that each container maps to a different server port (such as 8001, 8002, 8003).Each container should specify a different database name during installation.Configure an independent reverse proxy site for each container in the panel, and direct its domain to the respective server port.This, each AnQiCMS instance will have an independent runtime environment and database.

3. How should the 'site root directory' be filled in when creating multiple sites in the AnQiCMS backend?When AnQiCMS runs in a Docker container, its file system path is different from the host. Therefore, when creating a new site in the multi-site management of AnQiCMS backend, the "site root directory" should be filled with the internal path of the container, usually with/app/beginning. To ensure data isolation and uniqueness, it is recommended to add/app/a subdirectory named after the new site domain (replace dots with underscores), for example/app/newsite_anqicms_com. AnQiCMS will store the cache, configuration files, and other data of the site at this specified path inside the container.