WebApp deployment keeps failing. What is the cause?

Anonymous
2022-06-07T10:25:39.567+00:00

Greetings,
I'm trying to deploy my first WebApp from a GitHub repo of python code.
Very briefly, the repo has this structure:
root/
---- downloads <-- will contain the image uploaded by the user
---- templates/main.html <-- the html page that should be loaded
---- static/Images/ <-- now empy, will eventually contain the images for the page
---- lib/.... <-- stuff that the app will do once an image is loaded
---- application.py <-- Very simple python script to call the html page and route some functions to it
---- requirements.txt <-- the python requirements that will be installed during the build step
Of course, I've tried it multiple times locally, and it works perfectly fine.
Once I ask GitHub to deploy, however, I get this:
209059-defier-deploy-fail.png

When I check the specific step of the deployment which went wrong, I get this:
209096-image.png

The Log Stream of the application is also attached.209113-defier-webapp-log.txt

I tried to ask support, however, in the support page for this particular problem, I got told that a health check triggered a response from the customer support, and that they solved the problem 3 hours prior the time I'm writing this post.

I'd be very thankful for anyone kind enough to help me understanding what's going on here.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,956 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Manu Philip 16,986 Reputation points MVP
    2022-06-07T10:48:11.287+00:00

    It sounds like the port configured is not able to reach by the deployment as indicated in the below log entry

    Container defier_0_8d248356 didn't respond to HTTP pings on port: 8000, failing site start
    

    Check, if you can change the port to Port 80 to resolve the situation


    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.

  2. Anonymous
    2022-06-10T12:03:15.223+00:00

    Thanks a lot @Manu Philip & @Ryan Hill for helping me out.
    After a bit of debugging, I managed to get the app to work.
    The main problems were:

    1. The app needed to have this tree structure (it is very important to have the __init__.py file inside application):
      /app.py
      /requirements.txt
      /application
      ---/__init__.py (in which I just wrote 2 lines of code (from flask import Flask and app = Flask(__name__))
      ---/lib
      ---/static
      ---/templates
    2. Open-CV was crashing the application in the Azure machine, so I needed to migrate some code to PIL&numpy instead of cv2.
    3. The deployment was not successful using GitHub but for some strange reason it was using VIsual Studio Code and Azure tools.
    1 person found this answer helpful.