Coder Social home page Coder Social logo

som-d / python-flask-app-deploying-on-azure-web-apps Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 42.87 MB

Deploying Flask Application on Azure Web Apps

Python 97.31% C 0.06% JavaScript 0.05% CSS 1.67% PowerShell 0.08% Batchfile 0.01% Shell 0.01% HTML 0.21% Makefile 0.01% Roff 0.01% C++ 0.21% VBScript 0.01% XSLT 0.01% Classic ASP 0.01% Cython 0.10% Jinja 0.28% Smarty 0.01%
deploying-flask-application-on-azure-web-apps automation azure azure-webapp cicd deployment devops devops-tools flask flask-application pipline

python-flask-app-deploying-on-azure-web-apps's Introduction

Deploying Flask Application on Azure Web Apps

This repository contains a simple Flask application that can be deployed on Azure Web Apps. The application consists of a single endpoint that returns "Hello, Azure Web Apps!" when accessed.

Application Setup

Installation

To run the application locally, follow these steps:

  1. Clone this repository:

    git clone https://github.com/som-d/Python-Flask-App-Deploying-on-Azure-Web-Apps.git
  2. Navigate to the project directory:

    cd <project_directory>
  3. Install the required dependencies using pip:

    pip install -r requirements.txt

Running Locally

To run the application locally, execute the following command:

  • For Flask:

    python app.py

This will start a development server, and you can access the application at http://localhost:8000.

Azure Web App Deployment

Prerequisites

Before deploying the application to Azure Web Apps, ensure you have the following:

Deployment Steps

  1. Login to your Azure account using Azure CLI:

    az login
  2. Create a resource group:

    az group create --name <resource_group_name> --location <location>
  3. Create an Azure Web App:

    az webapp up --name <app_name> --resource-group <resource_group_name> --plan <app_service_plan_name> --sku <sku> --location <location>
  4. Deploy the application to Azure Web App:

    git push azure master

Accessing the Deployed Application

Once deployed, you can access the application at the URL provided by Azure Web Apps.

Repository Structure

  • app.py: Contains the Flask/FastAPI application code.
  • requirements.txt: Lists the dependencies required by the application.

Testing

To test the deployed application, simply access the URL of the Azure Web App in your web browser or use tools like cURL or Postman to make requests to the endpoint.

curl <azure_web_app_url>

You should receive a response "Hello, Azure Web Apps!" indicating that the application is running successfully.

Contributors

Feel free to contribute to this project by creating issues or submitting pull requests.

For any questions or issues, please contact [email protected]

Happy coding!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.