Ghost-Azure icon indicating copy to clipboard operation
Ghost-Azure copied to clipboard

Deploy through "Portal" link also failed with a "Resource Deployment Failure"

Open SimonDarksideJ opened this issue 3 years ago • 6 comments

Tried using the "Deploy via Portal" link, which resulted in failure, detail below:

{
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
  "details": [
    {
      "code": "Conflict",
      "message": "{\r\n  \"status\": \"Failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\"\r\n  }\r\n}"
    }
  ]
}

*Note, this was in a brand new Azure setup with no pre-existing resources defined

SimonDarksideJ avatar Jun 11 '21 10:06 SimonDarksideJ

Just tried again with the latest changes to the branch. Still the same result deploying to Azure. But can't seem to get much more detail than the above. Attached logs for what they are: Deployment-Microsoft.Template-20210614104233.zip

SimonDarksideJ avatar Jun 14 '21 09:06 SimonDarksideJ

Managed to get the site to successfully deploy using updates in @yannickRe fork azuredeploy script (I suspect the newer module versions and switch to "Basic" deploy might have done it. https://github.com/YannickRe/Ghost-Azure

However, site fails to load.

SimonDarksideJ avatar Jun 14 '21 14:06 SimonDarksideJ

It used to fail because of a conflict. Web app names must be globally unique: image

I will need more time to look at the whole deployment. The old handy button for azuredeploy seem to be deprecated. The ARM template needs some refactoring now, so it provides some meaningful defaults.

I'm going to leave that issue open until I am able to make it better.

RadoslavGatev avatar Jun 14 '21 15:06 RadoslavGatev

hey @SimonDarksideJ did you manage to get the site to spin up using either @RadoslavGatev or @YannickRe deploy scripts? I also encounter an 500 error when using Yannick's.

svict4 avatar Jan 27 '22 01:01 svict4

I do have the site running using @YannickRe 's deployment, however it's not reporting security issues and requires ghost to be updated. Need a find a path to come back to @RadoslavGatev version as it is using a newer version of Ghost.

SimonDarksideJ avatar Jan 27 '22 10:01 SimonDarksideJ

Hello @svict4, We are hitting the limits of the free App Service plans when deployments get longer. Technically if you try setting up a fresh blog, there is a huge chance it will work. But if you are redeploying a newer version of Ghost it will likely need more time.

If you encounter a 503 error, it most likely means that it got stuck on database migrations. The only way to recover it is to download the db file and remove the lock.

Generally, the deployment duration can be optimized by offloading most of the work to Azure pipelines/GitHub actions that can download the npm packages and leave just the database migrations to run on Kudu for example. However, that would make it more difficult for people to get started deploying Ghost on App Service...

RadoslavGatev avatar Jan 27 '22 19:01 RadoslavGatev