Hello Azure Container guru's
I'am trying to configure the following Azure Container Setup:
My first step (for simplicity) is the creation off 2 containers within a single container group on azure (without the fileshare). I create the following Azure Resource Manager template to create the ACI
I am using here fore the following blog
- https://markheath.net/post/aci-container-groups-wordpress
- https://github.com/Azure/azure-quickstart-templates/tree/master/201-aci-wordpress
ARM TEMPLATE
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"resources": [
{
"name": "test-wordpress-container-group",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-02-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"containers": [
{
"name": "front-end",
"properties": {
"image": "wordpress",
"resources": {
"requests": {
"cpu": 1,
"memoryInGb": 1.0
}
},
"ports": [
{
"port": 80
}
],
"environmentVariables": [
{
"name": "WORDPRESS_DB_PASSWORD",
"value": "wordpress"
},
{
"name": "WORDPRESS_DB_HOST",
"value": "127.0.0.0:3306"
}
]
}
},
{
"name": "back-end",
"properties": {
"image": "mysql:5.7",
"resources": {
"requests": {
"cpu": 1,
"memoryInGb": 1.0
}
},
"ports": [
{
"protocol": "tcp",
"port": "3306"
}
],
"environmentVariables": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "mysql"
}
]
}
}
],
"osType": "Linux",
"restartPolicy": "OnFailure",
"ipAddress": {
"type": "Public",
"dnsNameLabel": "wordpress-app",
"ports": [
{
"protocol": "tcp",
"port": 80
}
]
}
}
}
],
"outputs": {
"containerIPv4Address": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', 'wordpress-container-group')).ipAddress.ip]"
}
}
}
for executing the ARM template i used the following statment:
az group deployment create -n TestDeployment -g rg-WordPress --template-file "azuredeploy.json"
After a successful deployment I accesed the public URL. Where I expected to see the installation page of WordPress. However, I received the following error:
Error establishing a database connection