Z-BlogPHP is a blog program provided by the Z-Blog community, which has been committed to providing excellent blog writing experience for domestic users. It has been 16 years since the first version was released in 2005. It is one of the few open source CMS systems that continuously provide updates in China. Z-BlogPHP supports PHP 5.2 - 7.4 and 8.0, and can run on all operating systems and WEB servers on the market. The database supports MySQL database (compatible with MariaDB), as well as smaller and more convenient SQLite database. Version 1.7 also supports PostgreSQL database.
Introduction to architecture
| |
| |
| |
| |
| |
| |
Functional advantages
Support Z-BlogPHP native framework The migration of traditional Z-BlogPHP projects to Serverless often requires the transformation of the original projects. With the Serverless Z-BlogPHP component, you can directly complete the deployment without any modification to the original project, and support subsequent version updates. Reduce use cost From the access layer to the computing layer to the storage layer, all serverless resources are used to truly achieve volume based billing, elastic scaling, and greatly save costs Example: Take a personal blog website as an example, set daily visits of 100, 1 GB file storage, 1 GB database storage, and the monthly fee is calculated as follows:
-API gateway
Number of calls: 100/10000 * 0.06 * 30=0.018 yuan/month
Discharge: 100 * 30/1024/1024 * 0.8 * 30=0.068 yuan/month
-SCF Cloud Function
Number of SCF calls: 100 * 30=3000 times/month, free of charge
SCF resource usage fee: 30/1000 * 100 * 30=900GBs/month free limit, no fee
-CFS storage fee (monthly fee): 1 * 0.35=0.35 yuan/month
-Serverless MySQL database
Storage cost: 1 * 0.00485 yuan/GB/hour * 24 * 30=3.49 yuan/month
Calculation cost: 100 * 0.000095 * 30=0.285 yuan/month
Total: 0.018+0.068+0.35+3.49+0.285=4.211 yuan By comparison, we can find that compared with the traditional self built scheme, the cost of Serverless Z-BlogPHP is less than 5 yuan a month, which greatly reduces the use cost. Deployment is extremely simple It can be deployed directly through the Tencent cloud console. Or through the serverless Z-BlogPHP component, you can quickly complete the deployment of Z-BlogPHP applications with just a few lines of yml file configuration, greatly reducing the deployment threshold.
Deployment Steps
Deployment premise
Activate SCF cloud function service Activate CFS file storage service (Optional) Prepare the filed custom domain name, or you can complete the filing through the Serverless filing resource package
Console deployment (recommended by novice users)
Step 1: Log in to the Serverless application console and click "New Application" Step 2: Fill in the application name according to the instructions, select "Application Template" ->"Z-BlogPHP Application", and click "Create" Step 3: After creation, click "Access Application" to access your Z-BlogPHP project. You can also complete the configuration of custom domain names on the application details page
Command line deployment
Step 1: Initialize the Serverless Z-BlogPHP configuration file locally sls init zblogphp --name example Step 2: Enter the directory and execute SLS deploy to complete the deployment