CLI command | add-domain-mapping |
Description | Add domain mappings for the subscribed cartridge. |
Command format |
The path to the JSON file that defines the domain mapping needs to be defined as the |
Short option | Long option | Description | Required | Example value |
---|---|---|---|---|
N/A | N/A | ID of the application. | Yes |
|
|
| Folder path where the JSON file that defines the domain mappings is stored. | Yes | <STRATOS_SOURCE_HOME>/samples/applications/single-cartridge/domain-mappings.json |
{
"domainMappings": [
{
"cartridgeAlias": "tomcat",
"domainName": "abc.com",
"contextPath": "/abc/app"
}
]
}
For information on all the properties that can be used in a domain mapping definition, see the Domain Mapping Resource Definition.
Use case: Add the domain mappings defined in the <STRATOS_SOURCE_HOME>/samples/applications/single-cartridge/domain-mappings.json
file to the application with the ID: single-cartridge-app.
add-domain-mappings single-cartridge-app -p <STRATOS_SOURCE_HOME>/samples/applications/single-cartridge/domain-mappings.json
Successfully added domain mappings.