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.
Apps\Azure Web Apps
When finished, click Continue.
In the Summary page, verify your options and click Finish.
When you want to synchronize content in your cloud folder with App Service, go back to the Deployment Center page and click Sync.
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 the same ones that are run in production. Therefore, the deployment can fail because of locked files. The app in production may also behave unpredictably during deployment, because not all the files updated at the same time. There are a few different ways to avoid these issues:
- 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.
- Use Run From Package instead of continuous deployment.