|
| 1 | +# Deployment Artifact best practice |
| 2 | +The zip package you are deploying needs to contain all things that normally is present in an Umbraco Cloud environment-repository. |
| 3 | + |
| 4 | +Every new Umbraco Cloud project contains a readme.md file which explains the structure and how you can adapt it to suit your needs. |
| 5 | + |
| 6 | +The sample scripts on github includes a way to package the zip. As the scripts are samples they show a universal way to do this which works well for most people. But not all projects are alike, and you way not want to use that particular approach. |
| 7 | + |
| 8 | + |
| 9 | +## Do not include Dotnet Binaries |
| 10 | +Don’t include any binary build artifacts coming from the DotNet build/publish process. |
| 11 | + |
| 12 | +The general deployment process on Umbraco Cloud needs the source code and the system will rebuild it once it is pushed back to the environment. |
| 13 | + |
| 14 | +## Do not include the .git directory |
| 15 | +The folder will be ignored in the isolated instance, including the extra megabytes will slow down the deployment process. |
| 16 | + |
| 17 | +Also consider the artifact size limitation below. |
| 18 | + |
| 19 | +## Do include the finished frontend assets |
| 20 | +If you are using modern frontend build tools, ideally only include the finished frontend assets that are actually needed. No need to include javascript or typescript source files if you need to build the frontend. |
| 21 | + |
| 22 | +## Keep the Artifact as small as possible |
| 23 | +It is good practice to keep the zipped artifact as small as possible. |
| 24 | +* Large files will slow down the underlying git operations and therefore also the deployment process. |
| 25 | + * Do not include large files like pictures and pdf’s in the artifact. |
| 26 | + * Large files need to be uploaded to the blob storage connected to your environment. |
| 27 | +* Remove old and leftover code from the artifact. |
| 28 | + * Orphaned Csproj-files with outdated package-references are common causes for issues in the deployment process. |
| 29 | + |
| 30 | +Size limitations to consider: |
| 31 | +- The V1 endpoint will allow file sizes up to 128 MB. |
| 32 | +- In the V2 endpoint we have increased the size limit to 256 MB. |
0 commit comments