When you deploy an application from a container image or a code package in the SAE console, SAE starts the container using preset startup parameters. You can define a custom startup command in SAE to apply special configurations, such as for Nginx, or to overwrite the default startup parameters of the image.
Feature entry point
The access method varies depending on the scenario:
Create an application
Log on to the SAE console. In the navigation pane on the left, choose . Select a destination region and namespace, and then click Create Application.
On the Basic Information page, configure the parameters and click Next: Advanced Settings.
Modify a running application
After you redeploy an application, the application is restarted. To prevent unpredictable errors such as business interruptions, we recommend that you deploy applications during off-peak hours.
Log on to the SAE console. In the navigation pane on the left, choose . Select a destination region and namespace, and then click the name of the target application.
On the Basic Information page of the application, click Deploy Application.
Modify a stopped application
Log on to the SAE console. In the navigation pane on the left, choose . Select a destination region and namespace, and then click the name of the target application.
On the Basic Information page of the application, click Modify Application Configurations.
Configure startup commands for an application
Applications deployed from an image
You do not typically need to configure a startup command. This is because when you create an image, the container's startup command is already configured using ENTRYPOINT or CMD in the Dockerfile.
For example, the following command that is set in a Dockerfile runs when the container starts.
ENTRYPOINT [nginx, '-g', 'daemon off;'] To overwrite the startup command configured in the Dockerfile, perform the following steps:
In the Startup Command section, set Script Interpreter to >_ /bin/sh or >_ /bin/bash. Ensure that the image includes the selected script interpreter.
Configure the startup command for the container. The following examples show the required format:
>_ /bin/sh
sh -c 'while true; do echo hello; sleep 10;done'>_ /bin/bash
bash -c 'while true; do echo hello; sleep 10;done'

If you are not familiar with the ENTRYPOINT and CMD configurations in the original Dockerfile, do not customize or modify the startup command or parameters. An incorrect startup command will cause the application creation to fail.
Applications deployed from a JAR package
A Java application requires a startup command and parameters to start and run, such as Java Virtual Machine (JVM) parameters and garbage collection (GC) policies.
SAE automatically compiles the uploaded JAR package into an image and runs the application in a container. During this process, SAE uses a built-in startup command and parameters, and specifies the storage path for the JAR package. You can log on to the SAE console to modify the default startup command and its parameters.
In the Startup Command Settings section, specify the configuration items. The following is an example of a startup command.

Configuration item | Description |
Default startup command | The default startup command provided by SAE. |
options settings | Configure JVM parameters. For more information, see JVM parameter configuration, Tuning Java Virtual Machines, and JVM Tuning: How to Prepare Your Environment for Performance Tuning. To use the remote debugging feature for the application, configure the required command based on the JDK version.
The parameters are described as follows.
Important The startup commands for applications deployed from WAR packages and JAR packages are different. Do not use the same startup command for both deployment methods. The remote debugging command in this example applies to both deployment methods. |
args settings | Configure the redirection command for standard output and standard error, such as |
Applications deployed from a WAR package
In the Startup Command Settings section, specify the configuration items. The following is an example of a startup command.

Configuration item | Description |
Default startup command | The default startup command provided by SAE. |
options settings | Configure JVM parameters. For more information, see JVM parameter configuration, Tuning Java Virtual Machines, and JVM Tuning: How to Prepare Your Environment for Performance Tuning. To use the remote debugging feature for the application, configure the required command based on the JDK version.
The parameters are described as follows.
Important The startup commands for applications deployed from WAR packages and JAR packages are different. Do not use the same startup command for both deployment methods. The remote debugging command in this example applies to both deployment methods. |
Applications deployed from a ZIP package
In the Startup Command section, select a script type and configure the startup command for the container.
>_ /bin/sh
sh -c 'gunicorn -w 3 -b 0.0.0.0:8080 app.hello:app'>_ /bin/bash
bash -c 'gunicorn -w 3 -b 0.0.0.0:8080 app.hello:app'
