Created
September 13, 2017 13:42
-
-
Save lizrice/0a05339473a9e3090184daca2f264344 to your computer and use it in GitHub Desktop.
Example template for multi-container group in Azure Container Instance deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
}, | |
"resources": [ | |
{ | |
"name": "helloContainerGroup", | |
"type": "Microsoft.ContainerInstance/containerGroups", | |
"apiVersion": "2017-08-01-preview", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"containers": [ | |
{ | |
"name": "hello-web", | |
"properties": { | |
"image": "lizrice/hello:hardcoded", | |
"resources": { | |
"requests": { | |
"cpu": 0.5, | |
"memoryInGb": 0.5 | |
} | |
}, | |
"ports": [ | |
{ | |
"port": 8080 | |
} | |
] | |
} | |
}, | |
{ | |
"name": "hello-pg", | |
"properties": { | |
"image": "lizrice/hello-postgres", | |
"resources": { | |
"requests": { | |
"cpu": 0.5, | |
"memoryInGb": 0.5 | |
} | |
}, | |
"ports": [ | |
{ | |
"port": 5432 | |
} | |
] | |
} | |
} | |
], | |
"osType": "Linux", | |
"ipAddress": { | |
"type": "Public", | |
"ports": [ | |
{ | |
"protocol": "tcp", | |
"port": "8080" | |
} | |
] | |
} | |
} | |
} | |
], | |
"outputs": { | |
"containerIPv4Address": { | |
"type": "string", | |
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', 'helloContainerGroup')).ipAddress.ip]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment