Azure App Service Deployment Guide - Sanjel-Energy-Services/eService_WorkItems GitHub Wiki

Azure App Service Deployment Guide

Initial Setup

  1. Log into Azure Portal (portal.azure.com)
  2. Navigate to App Services
  3. Click "Create" -> Web app

Basic Configuration

  1. Select subscription and resource group
  2. Configure basic settings:
    • Enter unique app name (this will be part of the url)
    • un-check "Secure unique default hostname"
    • Publish -> select "code"
    • Select runtime stack "NET 6 LTS"
    • Choose operating system "windows"
    • Select region, for dev and uat is West US 2
    • Select App Service Plan tier (if new windows plan)

alt text

Deployment

  • Basic authentication Enable

Networking

  • Click next to open Networking tab.
  • Enable public access -> select "on"

Monitor + Secure

  • Click next to open monitor tab.
  • Click enable application insights -> yes.
  • Create new Application Insights .

Create App Service

Click Review + Create , wait for the deployment finishes.

Virtual Network Integration Setup

  1. Navigate App Service on the left menu select Settings -> Networking section
  2. Select Outbound traffic configuration -> Virtual network integration -> Not configured
  3. Click "Add virtual network integration"
  4. Configure VNet settings:
    • Select existing VNet used by Sanjel

alt text alt text

Environment Variables Configuration

  1. Navigate App Service on the left menu select Settings -> Environment variables
  2. Select "App settings" or "Connection strings" tab
  3. Click "Add" for each variable:
    • Set Name and Value

alt text

Deployment with GitHub Workflow

  1. Navigate App Service on the left menu select Overview
    • Click on "Download publish profile"
    • Save the content of the file as a secret in a GitHub repository, copy the file's content, navigate to the repository settings, go to "Secrets and variables" -> "Actions" under the "Security" section.

alt text

Clonning existing app

Select an app service in the same resource as group the new App service to clone

中文翻译

Azure App Service 部署指南

初始设置

  1. 登录 Azure 门户 (portal.azure.com)
  2. 导航到 App Services
  3. 点击 "创建" -> Web 应用

基本配置

  1. 选择订阅和资源组
  2. 配置基本设置:
    • 输入唯一的应用名称 (这将成为 URL 的一部分)
    • 取消勾选 "保护唯一默认主机名"
    • 发布 -> 选择 "代码"
    • 选择运行时堆栈 "NET 6 LTS"
    • 选择操作系统 "Windows"
    • 选择区域,开发和 UAT 环境选择 West US 2
    • 选择 App Service Plan 层级 (如果新建 Windows 计划)

部署

  • 启用基本身份验证

网络

  • 点击下一步打开网络选项卡
  • 启用公共访问 -> 选择 "开启"

监控 + 安全

  • 点击下一步打开监控选项卡
  • 点击启用应用洞察 -> 是
  • 创建新的应用洞察

创建 App Service

点击 "查看 + 创建",等待部署完成

虚拟网络集成设置

  1. 在左侧菜单中选择 App Service,然后选择设置 -> 网络部分
  2. 选择出站流量配置 -> 虚拟网络集成 -> 未配置
  3. 点击 "添加虚拟网络集成"
  4. 配置 VNet 设置:
    • 选择 Sanjel 使用的现有 VNet

环境变量配置

  1. 在左侧菜单中选择 App Service,然后选择设置 -> 环境变量
  2. 选择 "应用设置" 或 "连接字符串" 选项卡
  3. 为每个变量点击 "添加":
    • 设置名称和值

使用 GitHub 工作流部署

  1. 在左侧菜单中选择 App Service,然后选择概览
    • 点击 "下载发布配置文件"
    • 将文件内容保存为 GitHub 仓库的秘密,复制文件内容,导航到仓库设置,转到 "秘密和变量" -> "操作" 在 "安全" 部分下

克隆现有应用

选择与要克隆的新 App 服务在同一资源组中的应用服务