background

Cloud Hosting (Tencent CloudBase Run) is a new generation of cloud native application Engine (App Engine 2.0) provided by Tencent CloudBase (TCB), which supports hosting of any containerized applications.

CloudBase CMS is a Node.js-based Headless content management platform launched by cloud development. It provides rich content management functions, easy installation, easy secondary development, and closely integrated with the cloud development ecosystem to help developers improve development efficiency.

This article describes the process of manually deploying a CloudBase CMS from source code. You can download the latest CMS source code link from GitHub. When the source code is deployed, the CloudBase CMS back-end service is deployed in cloud hosting.

Tools to prepare

1. Install the Node.js LTS version

2. Use Node package manager NPM to install the CloudBase CLI tool of the latest version (1.0.0+).

npm install -g @cloudbase/cli@latest
Copy the code

3. Enable the cloud development service and create a pay-as-you-go environment. (If you already have a pay-as-you-go environment, skip this step.)

Log in to Tencent Cloud – Cloud development console, open the service according to the pop-up prompt, and create a pay-by-amount billing environment

Download and configure the project

Clone CMS content management system to local (or download the package directly)

git clone https://github.com/TencentCloudBase/cloudbase-extension-cms.git
Copy the code

Copy.env.example from the root directory of the project to.env.local and fill in the relevant configuration

# your cloud development environment Id ENV_ID= # administrator account name, the account name must be longer than 4 characters, support letters and numbers administratorName=admin # administrator account password, 8 to 32 characters, The password can contain only letters or digits. AdministratorPassword = # CMS console path, such as /tcb-cms/. You are advised to use the root path/deployPath= # Cloud access user-defined domain name (optional). Such as tencent.com accessDomain =Copy the code

The deployment of

1. Login

tcb login
Copy the code

2. Install dependencies

npm install 
​
npm run setup
Copy the code

If you get an exception using the NPM run setup command, you can go to a file in the Packages directory and manually execute NPM install.

Deployment of 3.

npm run deploy
Copy the code

After the deployment is successful, you will see the following image, and you can use it by visiting the website entrance

Enter theThe consoleYou can see the deployed application under My Application. Click Manage to see the application details

conclusion

This paper mainly introduces the rapid deployment of CMS content management system using cloud hosting

If an exception occurs using the NPM run setup command, you can either upgrade the node. js LTS version or manually run NPM install in a file in the Packages directory.

During the deployment process, the setup.sh script may report an error in the Windows operating system. You can manually create a setup.sh file by copying the file content to replace the previous one.

Product introduction

Cloud Development (TCB) is a cloud native integrated development environment and tool platform provided by Tencent Cloud. It provides developers with highly available, automatic and flexible expansion of back-end cloud services, including computing, storage, hosting and other serverless capabilities, which can be used for cloud integrated development of various end applications (small programs, Public account, Web application, Flutter client, etc.) to help developers build and manage back-end services and cloud resources in a unified manner, avoiding tedious server construction, operation and maintenance during application development. Developers can focus on the implementation of business logic, with lower development threshold and higher efficiency.

Open cloud development: console.cloud.tencent.com/tcb?tdl_anc…

The product documentation: cloud.tencent.com/product/tcb…

Technical documentation: Cloudbase.net? From =10004

Technical exchange plus Q group: 601134960

Latest news follow wechat official account [Tencent Yunyun Development]