Azure App Service Deployment Guide - Sanjel-Energy-Services/eService_WorkItems GitHub Wiki
Azure App Service Deployment Guide
Initial Setup
- Log into Azure Portal (portal.azure.com)
- Navigate to App Services
- Click "Create" -> Web app
Basic Configuration
- Select subscription and resource group
- 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)
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
- Navigate App Service on the left menu select Settings -> Networking section
- Select Outbound traffic configuration -> Virtual network integration -> Not configured
- Click "Add virtual network integration"
- Configure VNet settings:
- Select existing VNet used by Sanjel
Environment Variables Configuration
- Navigate App Service on the left menu select Settings -> Environment variables
- Select "App settings" or "Connection strings" tab
- Click "Add" for each variable:
- Set Name and Value
Deployment with GitHub Workflow
- 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.
Clonning existing app
Select an app service in the same resource as group the new App service to clone
中文翻译
Azure App Service 部署指南
初始设置
- 登录 Azure 门户 (portal.azure.com)
- 导航到 App Services
- 点击 "创建" -> Web 应用
基本配置
- 选择订阅和资源组
- 配置基本设置:
- 输入唯一的应用名称 (这将成为 URL 的一部分)
- 取消勾选 "保护唯一默认主机名"
- 发布 -> 选择 "代码"
- 选择运行时堆栈 "NET 6 LTS"
- 选择操作系统 "Windows"
- 选择区域,开发和 UAT 环境选择 West US 2
- 选择 App Service Plan 层级 (如果新建 Windows 计划)
部署
- 启用基本身份验证
网络
- 点击下一步打开网络选项卡
- 启用公共访问 -> 选择 "开启"
监控 + 安全
- 点击下一步打开监控选项卡
- 点击启用应用洞察 -> 是
- 创建新的应用洞察
创建 App Service
点击 "查看 + 创建",等待部署完成
虚拟网络集成设置
- 在左侧菜单中选择 App Service,然后选择设置 -> 网络部分
- 选择出站流量配置 -> 虚拟网络集成 -> 未配置
- 点击 "添加虚拟网络集成"
- 配置 VNet 设置:
- 选择 Sanjel 使用的现有 VNet
环境变量配置
- 在左侧菜单中选择 App Service,然后选择设置 -> 环境变量
- 选择 "应用设置" 或 "连接字符串" 选项卡
- 为每个变量点击 "添加":
- 设置名称和值
使用 GitHub 工作流部署
- 在左侧菜单中选择 App Service,然后选择概览
- 点击 "下载发布配置文件"
- 将文件内容保存为 GitHub 仓库的秘密,复制文件内容,导航到仓库设置,转到 "秘密和变量" -> "操作" 在 "安全" 部分下
克隆现有应用
选择与要克隆的新 App 服务在同一资源组中的应用服务