Web+ supports deploying applications that are developed in a variety of programming languages. You can deploy a native application if the suitable technology stack is not available. This topic describes how to deploy native applications in Web+.
Introduction to native applications
- Web+ requires manual installation of infrastructure software. You can customize the installation procedure in the Commands and lifecycle hooks sections. For example, you can use customized commands in the PostPrepareEnv section to install the required software or dependencies.
- Web+ does not provide default start commands. You must configure start commands in the Commands section or the Procfile file.
- In Web+, port 8080 is used as the service port of a native application by default. We recommend that you specify a service port that is specific to your environment. You can use the $WP_SERVICE_PORT environment variable to configure a service port for an application. Health checks for an application may fail if the service port is different from the listening port.
- A native application must be able to run as expected on the AliyunLinux2.1903 operating system (environment).
- You can attach a database to a native application. For more information, see ApsaraDB for RDS instances. You can retrieve database options that are predefined by Web+ from environment variables. To enable database access after configuring database options, you only need to select a compatible database driver. For more information about related environment variables, see Environment variables.
Archive a native application
. └── simpleserver
- Create a file named Procfile in the project directory of the application. Add the
following statement to the file.
- Use the following command to archive the application and create a deployment package.
The package is used to deploy the application in Web+.
zip -r simpleserver.zip . /
Deploy a native application in Web+
- Log on to the Web+ console.
- On the Overview page, click Create in the upper-right corner of the Last Updated Environments section.
- In the Basic Information step, select Native in the Tech Stack Type field, enter an application name and description, and then click Next.
- In the Environment Information step, enter an environment name, select Upload Local Application in the Package Source field, upload the deployment package, and then modify the deployment package version. Click Create with Low Cost Preset after the configuration is complete.
Access an application
- To view a demo about how to deploy an application in Web App Service, see Create an application and deployment environment in Web App Service.
- For more information about how to deploy an application in the console, see Deploy an application.
- For more information about how to use the CLI tool to create and deploy an application, see Use the CLI tool to deploy an application.
- For more information about how to manage hosted applications, see Overview of application details.
- For more information about how to manage deployment environments where applications reside, see Overview of deployment environments.