Open weikanglim opened 1 month ago
We would like to support developers using NSGs in their VNet with Azure App Service. That's not currently possible since App Service build uses Oryx which calls out to a Oryx server that doesn't have a static IP address. If we could do the build locally, then we could disable the Oryx build, and be able to use NSGs. If we try that now, our venv won't be uploaded, since your default behavior is to ignore any folders that resemble Python virtual environments. So we need webappignore so we can get azd to not ignore folders.
We are supporting both ACA and App Service in our repo now. If we had a .webapp ignore, we could avoid uploading the Dockerfile to App Service. Not a huge deal since that's a tiny file.
Many devs write their tests/ folder inside the src/ folder, due to the difficulties with having tests/ outside of src/. Ideally those tests would not get uploaded to App Service.
As authored by @jongio based on #4258. Related to #1039 , #4215
Background
We currently support
.dockerignore
files when uploading source for remote docker builds. This feature enhancement tracks addition of ignore files for other packaging protocols.Work In-scope
@jongio had gotten agreements from service teams to add support for
.webappignore
and.funcignore
files. These files are interpreted as standard .gitignore syntax. When present, these ignore files should be read as configuration to exclude files. The exclusion files apply relatively to the directory which the ignore file is present. Additional details of the implementation are specified below:Default behavior when ignore files not present
With
SCM_DO_BUILD_DURING_DEPLOYMENT=true
(for app service),remoteBuild=true
(for func-flex-consumption), users would not expect the following directories to be packaged:node_modules
(js)__py_cache__
,.venv
(python)Thus, we should continue applying these default exclusion behaviors when ignore files are not present.
For function apps,
local.settings.json
is a local configuration file that should not be expected to be published by default. We should take this into account as well. This isn't backwards compatible -- but is the right thing to do since it has been a missing user-requested feature of azd.Explorations
SCM_DO_BUILD_DURING_DEPLOYMENT
? See comment here.funcignore
? https://github.com/Azure/azure-functions-core-tools/issues/2701