Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PY] feat: deploy Python echo bot to azure #1353

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
{
"name": "Start",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"console": "integratedTerminal",
Expand Down
16 changes: 16 additions & 0 deletions python/samples/01.messaging.a.echoBot/env/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file includes environment variables that will be committed to git by default.

# Built-in environment variables
TEAMSFX_ENV=dev
APP_NAME_SUFFIX=dev

# Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups.
AZURE_SUBSCRIPTION_ID=
AZURE_RESOURCE_GROUP_NAME=
RESOURCE_SUFFIX=

# Generated during provision, you can also add your own variables.
BOT_ID=
TEAMS_APP_ID=
BOT_AZURE_APP_SERVICE_RESOURCE_ID=
BOT_DOMAIN=
4 changes: 4 additions & 0 deletions python/samples/01.messaging.a.echoBot/env/.env.dev.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file includes environment variables that will not be committed to git by default. You can set these environment variables in your CI/CD system for your project.

# Secrets. Keys prefixed with `SECRET_` will be masked in Teams Toolkit logs.
SECRET_BOT_PASSWORD=
11 changes: 11 additions & 0 deletions python/samples/01.messaging.a.echoBot/env/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment.

# Built-in environment variables
TEAMSFX_ENV=local
APP_NAME_SUFFIX=local

# Generated during provision, you can also add your own variables.
BOT_ID=
TEAMS_APP_ID=
BOT_DOMAIN=
BOT_ENDPOINT=
4 changes: 4 additions & 0 deletions python/samples/01.messaging.a.echoBot/env/.env.local.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file includes environment variables that will not be committed to git by default. You can set these environment variables in your CI/CD system for your project.

# Secrets. Keys prefixed with `SECRET_` will be masked in Teams Toolkit logs.
SECRET_BOT_PASSWORD=
2 changes: 1 addition & 1 deletion python/samples/01.messaging.a.echoBot/infra/azure.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
serverFarmId: serverfarm.id
siteConfig: {
alwaysOn: true
appCommandLine: 'gunicorn --bind=0.0.0.0 --timeout 600 api:api'
appCommandLine: 'gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 api:api'
linuxFxVersion: pythonVersion
appSettings: [
{
Expand Down
2,319 changes: 0 additions & 2,319 deletions python/samples/01.messaging.a.echoBot/poetry.lock

This file was deleted.

2 changes: 1 addition & 1 deletion python/samples/01.messaging.a.echoBot/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ packages = [
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python-dotenv = "^1.0.1"
teams-ai = { path = "../../packages/ai", develop = true }
teams-ai = "^1.0.0rc1"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
Expand Down
2 changes: 1 addition & 1 deletion python/samples/01.messaging.a.echoBot/teamsapp.local.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
# Visit https://aka.ms/teamsfx-actions for details on actions
version: 1.0.0
version: v1.3

provision:
# Creates a Teams app
Expand Down
2 changes: 1 addition & 1 deletion python/samples/01.messaging.a.echoBot/teamsapp.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
# Visit https://aka.ms/teamsfx-actions for details on actions
version: 1.0.0
version: v1.3

environmentFolderPath: ./env

Expand Down
Loading