I am trying to deploy via ARM Template an existing .war compiled java application (jhipster), into my azure webapp. I managed to deploy the .war file manually, without ARM template and everything it is working just fine, but it has been a lot of struggle 'till now and I did not manage to get it working via ARM template.
For a short background of my manual .war deploy: I followed the answer from here: Can I deploy a jhipster 5.0.0-beta.0 application in azure?
This question was asked by my work colleague, and the answer from @Peter Pan was just great! Now I am trying to make a deploy script which can deploy my entire solution with all its services.
Beside the .war file, which must be deployed in wwwroot, I actually need to deploy the web.config as well (described in the link above), in the same folder as the .war file, both in wwwroot. I don't know how can I do this, and also my current webapp deployment code is not copying my .war file in the webapp host. The deploy succeeds but its just an empty default webapp and the .war file does not exist on the file browser / FTP of the webapp.
This is the JSON describing my webapp:
{
"type": "Microsoft.Web/sites",
"apiVersion": "2016-08-01",
"name": "[variables('webAppName')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('serverfarms'))]"
],
"kind": "app",
"properties": {
"enabled": true,
"hostNameSslStates": [
{
"name": "[concat(variables('webAppName'), '.azurewebsites.net')]",
"sslState": "Disabled",
"hostType": "Standard"
},
{
"name": "[concat(variables('webAppName'), '.scm.azurewebsites.net')]",
"sslState": "Disabled",
"hostType": "Repository"
}
],
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverfarms'))]",
"reserved": false,
"scmSiteAlsoStopped": false,
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"hostNamesDisabled": false,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"httpsOnly": false,
"resources": [
{
"apiVersion": "2014-06-01",
"name": "MSDeploy",
"type": "Extensions",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', variables('webAppName'))]",
"[concat('Microsoft.Web/Sites/', variables('webAppName'), '/config/web')]"
],
"properties": {
"packageUri": "[variables('pathToWarFile')]"
}
}
]
}
Any help would be so much appreciated. Thank you!