How to view deployed web app files

Riyaj khureshi 0 Reputation points
2024-11-21T09:31:00.7233333+00:00

I have deployed my FastAPI on an Azure Web App, and the web app is working fine. How can I view or access the deployed codebase files in the web app?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,039 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,007 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tadas Šukys 5 Reputation points
    2024-11-21T12:06:37.14+00:00

    Hello,

    You can use App Service Editor to view the deployed files in Azure Web App. To access the editor, go to App Service Editor (Preview) in the Development Tools section of the left-hand navigation of your app and click Open Editor:

    User's image


  2. Laxman Reddy Revuri 1,040 Reputation points Microsoft Vendor
    2024-11-21T16:44:27.6933333+00:00

    Hi @Riyaj khureshi
    When you've deployed your FastAPI application using Azure Container Registry (ACR), the application code is packaged within the container image, not in the traditional file system like site/wwwroot that you would typically see with other Azure Web App deployments. To access your codebase files.

    To access codebase files in a FastAPI application deployed via Azure Container Registry (ACR),

    Install Docker CLI: Download and install Docker from Docker website

    Log in to ACR:

    docker login <registry-name>
    

    Replace <registry-name> with your Azure Container Registry name.

    Pull the Docker Image:

    docker pull <image-name>
    

    Replace <image-name> with your container image name.

    Run the Container Locally:

    docker run -p <port>:<port> -it <image-name>
    

    Replace <port> with your FastAPI app port (typically 8000).

    Access the Container’s Files: Open a shell session inside the running container:

    docker exec -it <container-id> /bin/bash
    

    Find <container-id> with:

    docker ps
    

    Browse to the application directory (e.g., /app or /usr/src/app).

    I hope this information is helpful.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.