Azure functions github deployment from subfolder -
i'm using azure functions github deployment. place function in src/server/functionname/
within repo, deployment works if function placed directly in functionname/
how deploy functions placed in subdirectories?
the documentation states
your host.json file , function folders should directly @ root of deploy.
but "should" doesn't mean "must", right?
what tried:
- various combinations of locations of host.json , function.json
- in
host.json
setrouteprefix
seems affect function's url:"http": { "routeprefix": "src/server" },
there few ways can customize deployment process. 1 way adding custom deployment script repository root. when .deployment
script exists azure run script part of deployment process detailed here. e.g. can write simple script copies files , directories sub directory \src\server
root, e.g.:
@echo off echo deploying functions ... xcopy "%deployment_source%\src\server" %deployment_target% /y /s
if don't want commit .deployment
file repo , requirements relatively simple, can via app settings adding project
app setting function app value being sub directory, e.g. src\server
.
Comments
Post a Comment