Skip to content

Commit cc266a7

Browse files
committed
Added note on running production mode from source.
1 parent b7e39f9 commit cc266a7

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

13/umbraco-cms/fundamentals/setup/server-setup/runtime-modes.md

+10
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ Also, templates cannot be edited on live environment as runtime compilation is n
116116

117117
Also ensure the `UmbracoApplicationUrl` is updated to the primary URL of your production environment, as this is used when sending emails (password reset, notifications, health check results, etc.) and the keep-alive task.
118118

119+
{% hint style="info" %}
120+
Static web assets are disabled when using Production mode, following [Microsoft guidance](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-7.0#static-files-in-non-development-environments). If you are running a non-Development environment using the Production runtime mode from source (non-published output), you will need to explicitly enable this. You can add the following line of code to your `Program.cs` file:
121+
122+
```csharp
123+
builder.WebHost.UseStaticWebAssets();
124+
```
125+
126+
This should not be used in a more typical production environment where you are hosting your application from published output.
127+
{% endhint %}
128+
119129
## Customize/extend runtime mode validation
120130

121131
Validation of the above-mentioned settings is done when determining the runtime level during startup using the new `IRuntimeModeValidationService` and when it fails, causes a `BootFailedException` to be thrown. The default implementation gets all registered `IRuntimeModeValidators` to do the validation, making it possible to remove default checks and/or add your own (inherit from `RuntimeModeProductionValidatorBase`, if you only want to validate against the production runtime mode). The following validators are added by default:

14/umbraco-cms/fundamentals/setup/server-setup/runtime-modes.md

+10
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ Also, templates cannot be edited on live environment as runtime compilation is n
115115

116116
Also ensure the `UmbracoApplicationUrl` is updated to the primary URL of your production environment, as this is used when sending emails (password reset, notifications, health check results, etc.) and the keep-alive task.
117117

118+
{% hint style="info" %}
119+
Static web assets are disabled when using Production mode, following [Microsoft guidance](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-7.0#static-files-in-non-development-environments). If you are running a non-Development environment using the Production runtime mode from source (non-published output), you will need to explicitly enable this. You can add the following line of code to your `Program.cs` file:
120+
121+
```csharp
122+
builder.WebHost.UseStaticWebAssets();
123+
```
124+
125+
This should not be used in a more typical production environment where you are hosting your application from published output.
126+
{% endhint %}
127+
118128
## Customize/extend runtime mode validation
119129

120130
Validation of the above-mentioned settings is done when determining the runtime level during startup using the new `IRuntimeModeValidationService` and when it fails, causes a `BootFailedException` to be thrown. The default implementation gets all registered `IRuntimeModeValidators` to do the validation, making it possible to remove default checks and/or add your own (inherit from `RuntimeModeProductionValidatorBase`, if you only want to validate against the production runtime mode). The following validators are added by default:

15/umbraco-cms/fundamentals/setup/server-setup/runtime-modes.md

+10
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ Also, templates cannot be edited on live environment as runtime compilation is n
122122

123123
Also ensure the `UmbracoApplicationUrl` is updated to the primary URL of your production environment, as this is used when sending emails (password reset, notifications, health check results, etc.).
124124

125+
{% hint style="info" %}
126+
Static web assets are disabled when using Production mode, following [Microsoft guidance](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-7.0#static-files-in-non-development-environments). If you are running a non-Development environment using the Production runtime mode from source (non-published output), you will need to explicitly enable this. You can add the following line of code to your `Program.cs` file:
127+
128+
```csharp
129+
builder.WebHost.UseStaticWebAssets();
130+
```
131+
132+
This should not be used in a more typical production environment where you are hosting your application from published output.
133+
{% endhint %}
134+
125135
## Customize/extend runtime mode validation
126136

127137
Validation of the above-mentioned settings is done when determining the runtime level during startup using the new `IRuntimeModeValidationService` and when it fails, causes a `BootFailedException` to be thrown. The default implementation gets all registered `IRuntimeModeValidators` to do the validation, making it possible to remove default checks and/or add your own (inherit from `RuntimeModeProductionValidatorBase`, if you only want to validate against the production runtime mode). The following validators are added by default:

16/umbraco-cms/fundamentals/setup/server-setup/runtime-modes.md

+10
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ Also, templates cannot be edited on live environment as runtime compilation is n
122122

123123
Also ensure the `UmbracoApplicationUrl` is updated to the primary URL of your production environment, as this is used when sending emails (password reset, notifications, health check results, etc.).
124124

125+
{% hint style="info" %}
126+
Static web assets are disabled when using Production mode, following [Microsoft guidance](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-7.0#static-files-in-non-development-environments). If you are running a non-Development environment using the Production runtime mode from source (non-published output), you will need to explicitly enable this. You can add the following line of code to your `Program.cs` file:
127+
128+
```csharp
129+
builder.WebHost.UseStaticWebAssets();
130+
```
131+
132+
This should not be used in a more typical production environment where you are hosting your application from published output.
133+
{% endhint %}
134+
125135
## Customize/extend runtime mode validation
126136

127137
Validation of the above-mentioned settings is done when determining the runtime level during startup using the new `IRuntimeModeValidationService` and when it fails, causes a `BootFailedException` to be thrown. The default implementation gets all registered `IRuntimeModeValidators` to do the validation, making it possible to remove default checks and/or add your own (inherit from `RuntimeModeProductionValidatorBase`, if you only want to validate against the production runtime mode). The following validators are added by default:

0 commit comments

Comments
 (0)