documentation icon indicating copy to clipboard operation
documentation copied to clipboard

[Request]: Add deployment steps for Azure App Service

Open web265p3 opened this issue 2 years ago • 7 comments

Summary

I read and followed all instructions how to deploy Strapi to an Azure App Service. (Except: I created a windows, not a linux app service plan)

However, the page only explains how to setup the infrastructure (App service, storage account...)

It does not explain how to deploy Strapi to the app service.

What I tried:

  1. I created a new strapi project locally - it works and I can start it on the localhost
  2. I run npm build and this seems also to be successful. The dist-folder now contains three sub folders: "build", "config" and "src"
  3. I copied all three folders to the wwwroot folder of my app service

I also followed all instructions from the page. But now I dont know how to continue. I have no node.js background knowledge, so I dont know if I need to take any further steps to start the app.

Can you update the information in the article or tell me what I am missing? I also dont need any CI/CD here, because I dont want to change the strapi code. I just want the OOTB features, so the deployment should be only necessary if there is an upgrade.

Why is it needed?

For people like me that have no NodeJS background knowledge, but want to get strapi OOTB features to work on Azure App services

Suggested solution(s)

Add a section to the documentation how to deploy the content of the dist folder to the app service.

Related issue(s)/PR(s)

No response

web265p3 avatar Jul 28 '22 09:07 web265p3

Hello @web265p3, I am sorry you are having issues deploying a Strapi application. We are going to rework the deployment guides in the near future, so these sorts of issues are really helpful to help us understand where users are struggling. I saw that Azure has instructions for deploying a locally git-controlled project. I will try to find time to test this myself this week and hopefully respond with some additional guidance.

stb13579 avatar Aug 01 '22 17:08 stb13579

Thanks! I just need to know where to copy the result folders of the build in the kuduu tools. Probably it's just copying the 3 folders somewhere... But where? :)

web265p3 avatar Aug 02 '22 20:08 web265p3

@StrapiShaun Did you find any time to go through the process again?

web265p3 avatar Aug 08 '22 09:08 web265p3

Hello @web265p3 , I started working on this today and should be able to finish tomorrow. There are some deployment details here as well: https://docs.microsoft.com/en-us/azure/app-service/deploy-local-git?tabs=cli

stb13579 avatar Aug 08 '22 17:08 stb13579

@StrapiShaun I now copied only the content of the "build" folder in the wwwroot. Now I get an output in the browser, but it complains that the admin-path was not found:

image

This is not surprising, because the strapi build command does not generate any admin folder or so. Maybe this helps you when you write your instructions...

I also opened an issue here in Stackoverflow.

web265p3 avatar Aug 12 '22 09:08 web265p3

@web265p3 Thanks for the follow-up. To me, this approach is not typical, but I am not a developer so I could be completely wrong. I am going to check with one of our solutions engineers and see if I can get some additional guidance.

stb13579 avatar Aug 17 '22 05:08 stb13579

Well, in the end I just followed the strapi docs:

image

So why should there be a build step that produces an output, if that output does not belong anywhere? Thanks!

web265p3 avatar Aug 17 '22 05:08 web265p3

hei @web265p3 Do you have any updates on this? Could you resolve the deployment issues? And if so, how? I am also struggling with the deployment to azure app-service...

alainkaiser avatar Nov 15 '22 20:11 alainkaiser

Hi @web265p3 and @alainkaiser ,

Did any of you got this working? I'm struggling with this too.

KarelVDH2 avatar Feb 24 '23 13:02 KarelVDH2

Struggling with this.... Looks like this issue has been open for months now. Any update?

TomMcEachan avatar Apr 05 '23 17:04 TomMcEachan

@TomMcEachan , maybe we should write in ALLCAPS

KarelVDH2 avatar Apr 06 '23 07:04 KarelVDH2

I managed to do it with a docker container but that was with serious trial and error.

TomMcEachan avatar Apr 12 '23 07:04 TomMcEachan

Any update here?

lokesh755 avatar Oct 22 '23 18:10 lokesh755

Hi, Thanks for reporting. I'm closing this issue but it's included in the meta issue for 3rd-party deployment guides (https://github.com/strapi/documentation/issues/1941). In the meantime if you'd like to create a PR for your suggestion, we'll be happy to review it 🤗

pwizla avatar Dec 04 '23 10:12 pwizla