Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
73 changes: 0 additions & 73 deletions .github/workflows/DockerBuild.AzureFunctionsBaseImage.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-azuretools.vscode-azurefunctions",
"ms-python.python"
]
}
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Python Functions",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 9091
},
"preLaunchTask": "func: host start"
}
]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"azureFunctions.deploySubpath": "samples/devops_azure_functions",
"azureFunctions.scmDoBuildDuringDeployment": true,
"azureFunctions.pythonVenv": ".venv",
"azureFunctions.projectLanguage": "Python",
"azureFunctions.projectRuntime": "~4",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.projectLanguageModel": 2,
"azureFunctions.projectSubpath": "samples/devops_azure_functions"
}
33 changes: 33 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "func",
"label": "func: host start",
"command": "host start",
"problemMatcher": "$func-python-watch",
"isBackground": true,
"dependsOn": "pip install (functions)",
"options": {
"cwd": "${workspaceFolder}/samples/devops_azure_functions"
}
},
{
"label": "pip install (functions)",
"type": "shell",
"osx": {
"command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt"
},
"windows": {
"command": "${config:azureFunctions.pythonVenv}\\Scripts\\python -m pip install -r requirements.txt"
},
"linux": {
"command": "${config:azureFunctions.pythonVenv}/bin/python -m pip install -r requirements.txt"
},
"problemMatcher": [],
"options": {
"cwd": "${workspaceFolder}/samples/devops_azure_functions"
}
}
]
}
17 changes: 0 additions & 17 deletions docker/AzureFunctionsBaseImage.Dockerfile

This file was deleted.

34 changes: 2 additions & 32 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,6 @@ Push to your _private_ AWS ECR instance, and configure lambda to run from this c

## AzureFunctionsBaseImage

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

[Sample](samples/AzureFunctions)

To use this image, setup your dockerfile like
```
FROM ghcr.io/esri/arcgis-python-api-azure-functions:latest
COPY . /home/site/wwwroot
```

Your copied resources will need to include:
- `host.json`, with your appsettings
- `function_app.py`, such as:

```
import arcgis
import azure.functions as func

app = func.FunctionApp()

@app.http_trigger(route='GET /', methods=['get'])
def main(req: func.HttpRequest) -> func.HttpResponse:
return func.HttpResponse(f"Hello from Azure Functions using ArcGIS API for Python {arcgis.__version__}!")
```

Push to the container registry of your choice.

For futher information, see:

- https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=asgi%2Capplication-level&pivots=python-mode-decorators#programming-model
- 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
- https://github.com/Azure/azure-functions-python-worker
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container
See `samples/devops_azure_functions` for a sample using the standard runtime deployment.
1 change: 0 additions & 1 deletion docker/samples/AzureFunctions/.dockerignore

This file was deleted.

48 changes: 0 additions & 48 deletions docker/samples/AzureFunctions/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions docker/samples/AzureFunctions/.vscode/extensions.json

This file was deleted.

6 changes: 0 additions & 6 deletions docker/samples/AzureFunctions/Dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions docker/samples/AzureFunctions/function_app.py

This file was deleted.

8 changes: 8 additions & 0 deletions samples/devops_azure_functions/.funcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git*
.vscode
__azurite_db*__.json
__blobstorage__
__queuestorage__
local.settings.json
test
.venv
Loading