Sync content from a cloud folder to Azure App Service
This article shows you how to sync your content to Azure App Service from Dropbox and OneDrive.
The on-demand content sync deployment is powered by the App Service Kudu deployment engine. You can work with your app code and content in a designated cloud folder, and then sync to App Service with the click of a button. Content sync uses the Kudu build server.
Enable content sync deployment
To enable content sync, navigate to your App Service app page in the Azure portal.
In the left menu, click Deployment Center > OneDrive or Dropbox > Authorize. Follow the authorization prompts.
You only need to authorize with OneDrive or Dropbox once. If you're already authorized, just click Continue. You can change the authorized OneDrive or Dropbox account by clicking Change account.
In the Configure page, select the folder you want to synchronize. This folder is created under the following designated content path in OneDrive or Dropbox.
- OneDrive:
Apps\Azure Web Apps
- Dropbox:
Apps\Azure
When finished, click Continue.
In the Summary page, verify your options and click Finish.
Synchronize content
When you want to synchronize content in your cloud folder with App Service, go back to the Deployment Center page and click Sync.
Note
Because of underlying differences in the APIs, OneDrive for Business is not supported at this time.
Disable content sync deployment
To disable content sync, navigate to your App Service app page in the Azure portal.
In the left menu, click Deployment Center > Disconnect.
What happens to my app during deployment?
All the officially supported deployment methods make changes to the files in the /home/site/wwwroot
folder of your app. These files are used to run your app. Therefore, the deployment can fail because of locked files. The app may also behave unpredictably during deployment, because not all the files updated at the same time. This is undesirable for a customer-facing app. There are a few different ways to avoid these issues:
- Run your app from the ZIP package directly without unpacking it.
- Stop your app or enable offline mode for your app during deployment. For more information, see Deal with locked files during deployment.
- Deploy to a staging slot with auto swap enabled.