Skip to content

Commit 769c3ca

Browse files
authored
Merge pull request #2375 from Esri/jtroe/azure-functions
2 parents c3330a2 + 52e9c7c commit 769c3ca

File tree

17 files changed

+221
-197
lines changed

17 files changed

+221
-197
lines changed

.github/workflows/DockerBuild.AzureFunctionsBaseImage.yaml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"ms-python.python"
5+
]
6+
}

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to Python Functions",
6+
"type": "debugpy",
7+
"request": "attach",
8+
"connect": {
9+
"host": "localhost",
10+
"port": 9091
11+
},
12+
"preLaunchTask": "func: host start"
13+
}
14+
]
15+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"azureFunctions.deploySubpath": "samples/devops_azure_functions",
3+
"azureFunctions.scmDoBuildDuringDeployment": true,
4+
"azureFunctions.pythonVenv": ".venv",
5+
"azureFunctions.projectLanguage": "Python",
6+
"azureFunctions.projectRuntime": "~4",
7+
"debug.internalConsoleOptions": "neverOpen",
8+
"azureFunctions.projectLanguageModel": 2,
9+
"azureFunctions.projectSubpath": "samples/devops_azure_functions"
10+
}

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "func",
6+
"label": "func: host start",
7+
"command": "host start",
8+
"problemMatcher": "$func-python-watch",
9+
"isBackground": true,
10+
"dependsOn": "pip install (functions)",
11+
"options": {
12+
"cwd": "${workspaceFolder}/samples/devops_azure_functions"
13+
}
14+
},
15+
{
16+
"label": "pip install (functions)",
17+
"type": "shell",
18+
"osx": {
19+
"command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt"
20+
},
21+
"windows": {
22+
"command": "${config:azureFunctions.pythonVenv}\\Scripts\\python -m pip install -r requirements.txt"
23+
},
24+
"linux": {
25+
"command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt"
26+
},
27+
"problemMatcher": [],
28+
"options": {
29+
"cwd": "${workspaceFolder}/samples/devops_azure_functions"
30+
}
31+
}
32+
]
33+
}

docker/AzureFunctionsBaseImage.Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

docker/README.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,6 @@ Push to your _private_ AWS ECR instance, and configure lambda to run from this c
2727

2828
## AzureFunctionsBaseImage
2929

30-
#### ghcr.io/esri/arcgis-python-api-azure-functions:latest
30+
The AzureFunctionsBase image has been deprecated in favor of using the standard runtime for Azure Functions development.
3131

32-
[Sample](samples/AzureFunctions)
33-
34-
To use this image, setup your dockerfile like
35-
```
36-
FROM ghcr.io/esri/arcgis-python-api-azure-functions:latest
37-
COPY . /home/site/wwwroot
38-
```
39-
40-
Your copied resources will need to include:
41-
- `host.json`, with your appsettings
42-
- `function_app.py`, such as:
43-
44-
```
45-
import arcgis
46-
import azure.functions as func
47-
48-
app = func.FunctionApp()
49-
50-
@app.http_trigger(route='GET /', methods=['get'])
51-
def main(req: func.HttpRequest) -> func.HttpResponse:
52-
return func.HttpResponse(f"Hello from Azure Functions using ArcGIS API for Python {arcgis.__version__}!")
53-
```
54-
55-
Push to the container registry of your choice.
56-
57-
For futher information, see:
58-
59-
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=asgi%2Capplication-level&pivots=python-mode-decorators#programming-model
60-
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-deploy-container-apps?tabs=acr%2Cbash&pivots=programming-language-python#create-and-test-the-local-functions-project
61-
- https://github.com/Azure/azure-functions-python-worker
62-
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container
32+
See `samples/devops_azure_functions` for a sample using the standard runtime deployment.

docker/samples/AzureFunctions/.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/samples/AzureFunctions/.gitignore

Lines changed: 0 additions & 48 deletions
This file was deleted.

docker/samples/AzureFunctions/.vscode/extensions.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)