0

I deployed Strapi API on Azure (Windows IIS).

I do not get any error under deployment. I used this way to deploy https://github.com/youkou2/Strapi-On-Azure-WebApp

When I start the site https://oskogencms.azurewebsites.net I get 500 error (see image)

enter image description here

Result of the deployment is here

enter image description here

Any ideas why it happens?

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43
podeig
  • 2,597
  • 8
  • 36
  • 60
  • 1
    How is the progress on this issue? Do you need further help? – Jason Pan May 21 '20 at 21:59
  • Hi Jason, I am really sorry. I had no possibility to test it. I will do it as soon as I can. Thank you for your help! I appreciate it a lot! – podeig May 22 '20 at 23:20
  • Hi Jason, Your post did not help me as expected. As you see files from KUDUS are there. It is not a problem to deploy these files to production app service. My question was why all the files there, but I do not get any start page? And this 500 code error. Why do I get it? Do you have the same file structure in your prod environment? What is in your web.config? – podeig May 25 '20 at 22:21
  • I suggest you follow my steps step by step, you can definitely try to succeed. My sample URL is provided in the comment, you can also test that your 500 Error does not appear. – Jason Pan May 26 '20 at 01:38

1 Answers1

1

UPDATE

In local, u need run D:\path\Strapi-On-Azure-WebApp-master> npm run-script build to build your admin page.

Then you need to compress the build folder into a build.zip file, and drag it into kudu. Open F12 to check the file upload progress.

enter image description here

When the transfer is successful, you can click the /admin link in the website like local.

enter image description here

PRIVIOUS

Based on your screenshot and description, I created a web app. Using the Windows platform node 12 LTS.

enter image description here

Step 1. First, I first create a webapp on the portal, and then use FTP to upload the downloaded source code, unzip it and upload it directly to the wwwroot path.

enter image description here

Step 2. Install the dependencies in npm i in the locally decompressed project, and then run the debug locally bynpm start. After confirming that there is no problem, compress the node_modules folder into a zip file with the file name node_modules.zip.

enter image description here

Step 3. Open kudu on the portal, and then F12, set window.localStorage ['maxViewItems'] = 3000, the actual maximum number of files in our project is 1190. Go to the D:\home\site\wwwroot> folder, then drag the node_modules.zip file directly into the directory, azure will automatically decompress and save the file to the directory, you need to wait for a while, it is recommended to open node_modules Folder, to see the change in the number of files, or in F12 Network to see the change in traffic, waiting for the transmission to complete. You must wait transfer success, it will cost your a long time.

Step 3. After all are completed, directly start the command D:\home\site\wwwroot>npm start will report an error, first need toD:\home\site\wwwroot>npm install sqlite3 --save It will also report an error but it does not matter. In the second step, execute D:\home\site\wwwroot>npm i, because the dependent packages that may not be successfully installed need to be re-detected and installed. Finally, execute D:\home\site\wwwroot>npm start to start successfully.

enter image description here

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • Hi Jason, Thanks a lot for so extended answer. I wil go to the office today and check it out. :) – podeig May 20 '20 at 07:08
  • @podeig Did you follow my steps step by step? I provided the sample code. I followed the steps to try to deploy. After the deployment, there was no error you said, so I am sure that your problem should be in the deployment. This is the URL after my successful deployment. I suggest you test it, and following my steps should solve your problem. https://panshubeinodeappwin.azurewebsites.net/ https://panshubeinodeappwin.azurewebsites.net/admin/auth/register – Jason Pan May 26 '20 at 01:36