Service Settings
Service Name
The unique identifier of the service within the environment. Service name modification is not supported after creation. If you have multiple environments, services can have the same name across different environments. (For example, both the development environment and the testing environment can have a service named "testservice").
Network Settings
- Public network switch and domain name: When enabled, the cloud hosting service will have a public domain name. The public domain name can be accessed via the public network using the HTTPS protocol. The public domain name can be used by frontend mini-programs, APP, and Web applications to access the cloud hosting service via the domain name. When disabled, the domain name will no longer be provided, and the service cannot be accessed via the public network using the HTTPS protocol. However, it does not affect accessing the service via the callContainer method in mini-programs.
- Intranet switch and domain name: When enabled, the cloud hosting service will have an intranet domain name. The intranet domain name is used by other services in the same environment to access the current service via the intranet domain. The intranet domain name has no access protocol restrictions; it can be accessed via the intranet using any protocol exposed by the service's specific ports.
When invoking services using the callContainer method in Mini Programs, a dedicated private link between WeChat and Tencent Cloud is utilized, which remains unaffected by the public network switch status. Additionally, this private link offers enhanced capabilities.
Runtime Specifications Configuration
Configure the CPU and memory specifications for service instances. The current CPU-to-memory ratio is fixed at 1:2, meaning 1 CPU core corresponds to 2GiB memory. The minimum configurable specification is 0.25 cores with 0.5GiB memory, while the maximum is 16 cores with 32GiB memory.
The instance specifications for the service scale in a fixed manner according to the configuration. Specifically, scaling out increases the number of instances by one or more, each with the configured specifications.
Environment Variables
Service environment variables can be set and then accessed within service instances.
Environment variables can be configured in two ways: Key-Value method or JSON method. The Key-Value method involves separately setting the environment variable's Key and Value, for example: "MyEnvKey":"MyEnvValue"
. The JSON method requires writing compliant JSON, where the keys in the JSON will correspond to the environment variable keys, and their values will serve as the environment variable values, for example:
{
"DATABASE_URL": "postgresql://user:password@host:port/database",
"API_KEY": "your_api_key",
"NODE_ENV": "development"
}
Log Settings
Log settings configure how logs are collected from service instances. By default, logs are configured as stdout
, collecting standard output logs. Log settings support collecting multiple log types, including standard output and log files. For log file configuration, wildcard paths using *
are supported. Multiple configurations are separated by commas ,
.
After configuring logs, the collected log content can be queried in the service logs.
Log configuration example:
stdout //Collects only standard output logs
stdout,/path/to/logfile //Collects standard output logs and log files at the configured path
stdout,/path/to/log/* //Collects standard output logs and all log files in the configured path
/path/to/log/logfile* //Collects multiple log files starting with logfile