Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How an Azure Functions app can be copied?

I have an Azure Functions app working for development purposes, using a Table Storage account with test data. Now I want to have a separate environment (same Functions app with different storage config/conn-string) for production.

So, how can I "copy" my Azure Functions App in order to avoid manual recreation of it in the Azure portal?

like image 916
Néstor Sánchez A. Avatar asked Mar 10 '17 17:03

Néstor Sánchez A.


Video Answer


2 Answers

There are a couple of ways you can move the content from one Function App to another. The simplest is to copy the contents of your wwwroot folder to the other environment, which you can do by using Kudu, FTP, etc.

Another way that is often simpler and less error prone is to setup CI/CD so that different branches will trigger deployments to different environments. You can learn more about the continuous deployment options here.

like image 68
Fabio Cavalcante Avatar answered Sep 29 '22 21:09

Fabio Cavalcante


  1. Stop Azure Function
  2. Open up the browser, navigate to https://{functionName}.scm.azurewebsites.net/DebugConsole
  3. Navigate to site/wwwroot
  4. Create a new folder (which would represent your new functions) and copy the contents of your function app (which is one of the folder in this directory) into that folder. Folder names = Function Names
  5. Start Azure Function
like image 23
4c74356b41 Avatar answered Sep 29 '22 21:09

4c74356b41