Summary:
Deploying applications to the cloud requires choosing suitable services and understanding the deployment process. In this tutorial, we’ll focus on deploying a Python-based Flask application to Azure using Azure App Service.
Step 1: Setting Up Your Flask Application
- Create Your Flask Application: Start by building your Flask application. Ensure that the main file is named
application.pyfor compatibility during deployment on Azure. This is crucial for maintaining data integrity in a cloud infrastructure. - Go to your Github and change the name of adding another file with
application.pyNote: You might get errors when you have more than one file with py extension.

Step 2: Azure Portal Setup
- Sign In/Sign Up on Azure Portal: https://portal.azure.com/
If you haven’t already, sign up for an Azure account. You can opt for a student subscription or use the free subscription for the first year.
2. Accessing App Services:
Navigate to the Azure portal and locate “App Services.” and click on “Create” to start the process of creating a new service.

Step 3: Confugure your Web App
- Choose “Web App” among the options.

2. Select your subscription and create a new resource group (if needed).
3. Fill in the instance name, select the “code” option, choose the Python version, and leave other settings as default.
Get Johnas Chami’s stories in your inbox
Join Medium for free to get updates from this writer.
4. Proceed to the “databases” section and maintain default settings and then skip ahead to the “deployments” section.

Step 4: Confuguring GitHub Actions
- Enable GitHub Actions settings and link your GitHub account.
2. Choose the repository and branch for deployment and skip other settings, review your configurations, and proceed with the deployment creation.
3. After deployment, a GitHub workflow file will be generated in your repository.
Step 5: Checking Deployment Status
- Access the created resource and note the default domain address.
2. Give some time for the deployment to complete as the model is still in the deployment phase.

3. Monitor your deployment with GitHub Actions. Go to your GitHub repository and navigate to GitHub Actions and observe the step-by-step progress of your application’s deployment.

Step 6: Verifying Successful Deployment
- Check GitHub Actions to ensure both build and deployment phases are successful.
2. Note the time taken for the deployment process.
Final Step:
- Accessing the deployed application: Use the default domain provided to access your deployed application.

- Verify that your Flask application is running as expected.
