You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Web application function
Creating web apps
Copy page
Download PDF
Creating web apps
The web app helps you host native web framework applications. You can write web programs by using popular frameworks in various languages, such as Golang Gin, or custom container images. You can also migrate existing web apps. This topic describes how to create a web app.​
Prerequisites​
  • The veFaaS has been activated.​
  • Cross-service authorization has been completed if you use veFaaS for the first time.​
  • (Optional) To upload code via TOS, store the code ZIP file in TOS in advance. For specific operations, see Getting started with TOS.​
  • (Optional) If you need to upload code from your on-premises computer or via TOS, make sure that the code Zip file is not encrypted and its size does not exceed 256 MiB.​
  • (Optional) If you need to access a VPC, make sure that the VPC service of Volcano Engine has been activated, and a VPC, subnets, and security groups have been created in the region where the function is to be deployed. For details, refer to Creating VPCs, Creating subnets, and Creating security groups.​
  • (Optional) If you need to view function logs, make sure that Volcano Engine Torch Log Service (TLS) has been activated. If you need to use a custom logging project to handle function logs, ensure that the project and topics have already been created. For details, see Creating log projects and Creating log topics.​
  • (Optional) If you need to manage function resources by using projects, create a project in advance. For specific operations, see Creating projects.​
Limits​
When you deploy a function by using a container image:​
  • The container image must be pushed to a Volcano Engine CR instance that is deployed in the same region as the function.​
  • After the function is created, you must wait for the image synchronization to complete before releasing the function.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation pane, select the target region.​
  1. In the left navigation pane, click Function > Function management. On the Function page, click Create function.​
  1. On the Select function creation method page, click Web app function > Create Web app function. Specify the parameters based on the following descriptions.​
  • Basic information​
  • ​
    Parameter​
    Description​
    Function name​
    Specify a custom name for the function. Function names cannot be repeated within the same account. After a function name is created, it cannot be modified.​
    ​
  • Function code​
  • ​
    Parameter​
    Description​
    Deployment method​
    You can select one of the following deployment methods based on your business requirements.​
    • Image: Deploy the function by using a container image.​
    tip​
    Public images are contributed by community developers. veFaaS does not maintain them. If you encounter issues during software usage, provide feedback to the community.​
    • CR: Select a specific image for deployment from Volcano Engine CR. You can filter out a specific image by instance, namespace, and repository type (public or private).​
    • When you select an image from Container Registry, veFaaS automatically obtains the configurations of the image, including the startup command and environment variables. You can specify whether to apply the configurations of the selected image to the function.​
    • Public image: An out-of-the-box preset image of veFaaS.​
    • Code package​
    tip​
    The code Zip file must not be encrypted and must not exceed 256 MiB in size.​
    • Function template: The built-in, ready-to-use code templates provided by veFaaS. Click Code preview to view the resource files and code details included in the current template. Select an appropriate code template based on your business requirements.​
    • Upload code locally: Upload a locally developed ZIP file.​
    • Upload from TOS: In the upload area, select the target bucket and ZIP file.​
    Runtime​
    Select a runtime environment for the function code. If the preset runtime does not meet your business requirements, you can use a custom image to create a runtime that meets your business requirements for code execution environment and startup method. For instructions on creating custom runtimes, see Creating custom runtimes.​
    Webserver mode​
    Default value: Yes. You need to implement an HTTP server in the image or code and enable the server to listen on a port to process requests.​
    Start command​
    Enter the start command of the program.​
    • When the deployment method is set to Image, if you need to specify a script file, use an absolute path and make sure that the script has executable permissions. If you do not enter a script, the /opt/application/run.sh script is executed by default.​
    • When the deployment method is set to Code, if you need to specify a script file, use a relative path from the code package root directory and make sure that the script has executable permissions. If you do not enter a script, the script ./run.sh in the root directory of the code package will be executed by default.​
    Listening port​
    Enter the port that the HTTP server listens on. The default port is port 8000. Valid values: 1024 to 65535. Avoid using ports 9000, 9001, and 9990, which are occupied by services.​
    warning​
    The enabled HTTP server needs to listen on 0.0.0.0:Port or *:Port. Otherwise, a request timeout error will occur.​
    ​
  • Advanced settings​
  1. Click Create to create the function.​
Subsequent operations​
Release the code and configuration of the function. For detailed operations, see Releasing functions.​
​
Last updated: 2026.08.19 14:06:06