Skip to content

Commit 7fe72c9

Browse files
authored
Merge branch 'main' into uc-payment-links
2 parents 747a10f + 58a30bd commit 7fe72c9

File tree

5,555 files changed

+197768
-1424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,555 files changed

+197768
-1424
lines changed

10/umbraco-cms/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* [Hosting Umbraco in IIS](fundamentals/setup/server-setup/iis.md)
3535
* [File And Folder Permissions](fundamentals/setup/server-setup/permissions.md)
3636
* [Runtime Modes](fundamentals/setup/server-setup/runtime-modes.md)
37+
* [Running Umbraco in Docker](fundamentals/setup/server-setup/running-umbraco-in-docker.md)
3738
* [Umbraco in Load Balanced Environments](fundamentals/setup/server-setup/load-balancing/README.md)
3839
* [Load Balancing Azure Web Apps](fundamentals/setup/server-setup/load-balancing/azure-web-apps.md)
3940
* [Standalone File System](fundamentals/setup/server-setup/load-balancing/file-system-replication.md)

10/umbraco-cms/extending/language-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,4 @@ In the above example of a missing translation for "assignDomain", locate this st
194194
</language>
195195
```
196196

197-
If you modify core language files or introduce a new language, you can assist the community by sharing your updates. This can be done by [submitting a pull request](https://github.com/umbraco/Umbraco-CMS/blob/contrib/.github/CONTRIBUTING.md) so that your changes are merged into the core.
197+
If you modify core language files or introduce a new language, you can assist the community by sharing your updates. This can be done by [submitting a pull request](https://github.com/umbraco/Umbraco-CMS/blob/main/.github/CONTRIBUTING.md) so that your changes are merged into the core.

10/umbraco-cms/extending/packages/language-files-for-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The `App_Plugins` version of the `Lang` directory is case sensitive on Linux sys
2222

2323
Each language file can include one or more area. Each area contains a collection of language keys with the translation.
2424

25-
For reference on the language file format see the core [language files on GitHub](https://github.com/umbraco/Umbraco-CMS/tree/contrib/src/Umbraco.Core/EmbeddedResources/Lang)
25+
For reference on the language file format see the core [language files on GitHub](https://github.com/umbraco/Umbraco-CMS/tree/main/src/Umbraco.Core/EmbeddedResources/Lang)
2626

2727
### Sample structure
2828

10/umbraco-cms/fundamentals/setup/server-setup/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ Best practices for running Umbraco on Azure Web Apps.
3030
## [Runtime modes](runtime-modes.md)
3131

3232
The runtime mode setting optimizes Umbraco for the best development experience or optimal production environment.
33+
34+
## [Running Umbraco in Docker](running-umbraco-in-docker.md)
35+
36+
Overview of topics to consider when running Umbraco in Docker.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Running Umbraco in Docker
2+
3+
Exactly how you choose to compose your Dockerfile will depend on your project specific needs. This section is not intended as a comprehensive guide, rather as an overview of topics to be aware of when hosting in Docker.
4+
5+
## What is Docker
6+
7+
Docker is a platform for developing, shipping, and running applications in containers. Multiple services exist for hosting these containers. For more information, refer to the [official Docker Documentation](https://docs.docker.com/)
8+
9+
## The Docker file system
10+
11+
By default, files created inside a container are written to an ephemeral, writable container layer.
12+
This means that the files don't persist when the container is removed, and it's challenging to get files out of the container. Additionally, this writable layer is not suitable for performance-critical data processing.
13+
14+
This has implications when running Umbraco in Docker.
15+
16+
For more information, refer to the [Docker documentation on storage](https://docs.docker.com/engine/storage/).
17+
18+
### General file system consideration
19+
20+
In general, when working with files and Docker you work in a "push" fashion with read-only layers. When you build, you take all your files and "push" them into this read-only layer.
21+
22+
This means that you should avoid making files on the fly, and instead rely on building your image.
23+
24+
In an Umbraco context, this means you should not create or edit template, script or stylesheet files via the backoffice. These should be deployed as part of your web application and not managed via Umbraco.
25+
26+
Similarly, you shouldn't use InMemory modelsbuilder, since that also relies on creating files on the disk. While this is not a hard requirement, it doesn't provide any value unless you are live editing your site.
27+
28+
Instead, configure models builder to use "source code" mode in development, and "none" in production, as [described when using runtime modes](https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/runtime-modes).
29+
30+
31+
### Logs
32+
33+
Umbraco writes logs to the `/umbraco/Logs/` directory. Due to the performance implications of writing to a writable layer,
34+
and the limited size, it is recommended to mount a volume to this directory.
35+
36+
### Data
37+
38+
The `/umbraco/Data/` directory is used to store temporary files, such as file uploads. Considering the limitations of the writable layer, you should also mount a volume to this directory.
39+
40+
### Media
41+
42+
It's recommended to not store media in the writable layer. This is for similar performance reasons as logs,
43+
but also for practical hosting reasons. You likely want to persist media files between containers.
44+
45+
One solution is to use bind mounts. The ideal setup, though, is to store the media and ImageSharp cache externally. For more information, refer to the [Azure Blob Storage documentation](https://docs.umbraco.com/umbraco-cms/extending/filesystemproviders/azure-blob-storage).
46+
47+
### Required files
48+
49+
Your solution may require some specific files to run, such as license files. You will need to pass these files into the container at build time, or mount them externally.
50+
51+
## HTTPS
52+
53+
When running websites in Docker, it's common to do so behind a reverse proxy or load balancer.
54+
In these scenarios you will likely handle SSL termination at the reverse proxy. This means that Umbraco will not be aware of the SSL termination, and will complain about not using HTTPS.
55+
56+
Umbraco checks for HTTPS in two locations:
57+
58+
1. The `HstsCheck` health check - This will result in a failed healthcheck.
59+
2. The `UseHttpsValidator` - This will result in a build error, if Production runtime mode is used.
60+
61+
To avoid these checks failing, you can remove them in your project.
62+
63+
### Health Check
64+
65+
The health check must be removed via configuration, through the `appsettings.json` file, environment variables, or similar. For more information see the [Health Check documentation](../../../reference/configuration/healthchecks.md).
66+
67+
The `HstsCheck` key is `E2048C48-21C5-4BE1-A80B-8062162DF124` so the appsettings will look something like:
68+
69+
```json
70+
"Umbraco": {
71+
"CMS": {
72+
"HealthChecks" : {
73+
"DisabledChecks": [
74+
{
75+
"Id": "E2048C48-21C5-4BE1-A80B-8062162DF124"
76+
}
77+
]
78+
},
79+
{...}
80+
```
81+
82+
### Runtime mode validator
83+
84+
The `UseHttpsValidator` must be removed through code For more information see the [Runtime mode documentation](runtime-modes.md).
85+
86+
The code to remove the validator can look something like:
87+
88+
```C#
89+
using Umbraco.Cms.Core.Composing;
90+
using Umbraco.Cms.Infrastructure.Runtime.RuntimeModeValidators;
91+
92+
namespace MySite;
93+
94+
public class DockerChecksRemover : IComposer
95+
{
96+
public void Compose(IUmbracoBuilder builder)
97+
=> builder.RuntimeModeValidators().Remove<UseHttpsValidator>();
98+
}
99+
100+
```

10/umbraco-cms/implementation/custom-routing/signalR.md

Lines changed: 6 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -34,53 +34,9 @@ public class TestHub : Hub<ITestHubEvents>
3434
}
3535
```
3636

37-
## Define a custom route
38-
39-
Next up, is defining a custom route. For this, we are going to use a `IAreaRoutes` and the base umbrace backend path so we dont have to reserve another path in the settings.
40-
41-
```csharp
42-
using Microsoft.AspNetCore.Builder;
43-
using Microsoft.Extensions.DependencyInjection;
44-
using Umbraco.Cms.Core.Composing;
45-
using Umbraco.Cms.Core.DependencyInjection;
46-
using Umbraco.Cms.Web.Common.ApplicationBuilder;
47-
using Umbraco.Extensions;
48-
49-
public class TestHubRoutes : IAreaRoutes
50-
{
51-
private readonly IRuntimeState _runtimeState;
52-
private readonly string _umbracoPathSegment;
53-
54-
public TestHubRoutes(
55-
IOptions<GlobalSettings> globalSettings,
56-
IHostingEnvironment hostingEnvironment,
57-
IRuntimeState runtimeState)
58-
{
59-
_runtimeState = runtimeState;
60-
_umbracoPathSegment = globalSettings.Value.GetUmbracoMvcArea(hostingEnvironment);
61-
}
62-
63-
public void CreateRoutes(IEndpointRouteBuilder endpoints)
64-
{
65-
switch (_runtimeState.Level)
66-
{
67-
case Umbraco.Cms.Core.RuntimeLevel.Run:
68-
endpoints.MapHub<TestHub>(GetTestHubRoute());
69-
break;
70-
}
71-
72-
}
73-
74-
public string GetTestHubRoute()
75-
{
76-
return $"/{_umbracoPathSegment}/{nameof(TestHub)}";
77-
}
78-
}
79-
```
80-
8137
### Add the routing to the Umbraco Composer
8238

83-
Last step in the setup is registering our custom route:
39+
The next step in the setup is registering our custom route:
8440

8541
```csharp
8642
using Microsoft.AspNetCore.Builder;
@@ -101,18 +57,17 @@ public class TestHubComposer : IComposer
10157
builder.Services.AddSignalR();
10258
}
10359

104-
// next is adding the routes we defined earlier
105-
builder.Services.AddUnique<TestHubRoutes>();
10660
builder.Services.Configure<UmbracoPipelineOptions>(options =>
10761
{
10862
options.AddFilter(new UmbracoPipelineFilter(
109-
"test",
110-
endpoints: applicationBuilder =>
63+
"Signalr",
64+
endpoints: applicationBuilder =>
11165
{
11266
applicationBuilder.UseEndpoints(e =>
11367
{
114-
var hubRoutes = applicationBuilder.ApplicationServices.GetRequiredService<TestHubRoutes>();
115-
hubRoutes.CreateRoutes(e);
68+
e.MapHub<TestHub>($"/umbraco/{nameof(TestHub)}");
69+
70+
// Register more SignalR hubs or routes here...
11671
});
11772
}
11873
));

10/umbraco-cms/implementation/integration-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: A guide to getting started with integration testing in Umbraco
55

66
# Integration Testing
77

8-
These examples are for Umbraco 10. They use [NUnit](https://nunit.org/) as the testing framework. Leveraging [Umbraco.Cms.Tests.Integration](https://github.com/umbraco/Umbraco-CMS/tree/contrib/tests/Umbraco.Tests.Integration) providing base classes. Beware that the Nuget package has an issue fixed in v10.3.1. So it is recommended to use this version.
8+
These examples are for Umbraco 10. They use [NUnit](https://nunit.org/) as the testing framework. Leveraging [Umbraco.Cms.Tests.Integration](https://github.com/umbraco/Umbraco-CMS/tree/main/tests/Umbraco.Tests.Integration) providing base classes. Beware that the Nuget package has an issue fixed in v10.3.1. So it is recommended to use this version.
99

1010
## Getting started
1111

10/umbraco-cms/reference/angular/directives/umbproperty.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ var property = {
3030

3131
The `view` property specifies the URL to the property editor that should be used for this property. To use one of the built-in property editors in Umbraco, you can specify the alias (eg. `textbox`) rather than the full URL to the view (eg. `/umbraco/Views/propertyeditors/textbox/textbox.html`).
3232

33-
You can see a list of all the built-in property editors in the [propertyeditors folder on GitHub](https://github.com/umbraco/Umbraco-CMS/tree/v11/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors).
33+
You can see a list of all the built-in property editors in the [propertyeditors folder on GitHub](https://github.com/umbraco/Umbraco-CMS/tree/83107bb31a7fe98f6c5b0a601c0e8ee898cd274b/src/Umbraco.Web.UI.Client/src/views/propertyeditors).

10/umbraco-cms/reference/cache/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Although caching is a pretty standard concept it is very important to make sure
1313

1414
In normal environments caching seems to be a pretty standard concept. If you are a package developer or developer who is going to publish a codebase to a load balanced environment then you need to be aware of how to invalidate your cache properly, so that it works in load balanced environments. If it is not done correctly then your package and/or codebase will not work the way that you would expect in a load balanced scenario.
1515

16-
**If you are caching business logic data that changes based on a user's action in the backoffice and you are not using an **_**ICacheRefresher**_** then you will need to review your code and update it based on the below documentation.**
16+
**If you're caching business logic based on backoffice user actions without using an _ICacheRefresher_, review and update your code using the documentation below.**
1717
{% endhint %}
1818

1919
## Retrieving and Adding items in the cache
@@ -48,10 +48,10 @@ There are 2 other base types of `ICacheRefresher` which are:
4848
* `ICacheRefresher<T>` - this inherits from `ICacheRefresher` and provides a set of strongly typed methods for cache invalidation. This is useful when executing the method to invoke the cache refresher, when you have the instance of the object already since this avoids the overhead of retrieving the object again.
4949
* `void Refresh(T instance);` - this would invalidate/refresh a single cache for the specified object.
5050
* `void Remove(T instance);` - this would invalidate a single cache for the specified object.
51-
* `IJsonCacheRefresher` - this inherits from `ICacheRefresher` but provides more flexibility if you need to invalidate cache based on more complex scenarios (e.g. the [MemberGroupCacheRefresher](https://github.com/umbraco/Umbraco-CMS/blob/v11/contrib/src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs)).
51+
* `IJsonCacheRefresher` - this inherits from `ICacheRefresher` but provides more flexibility if you need to invalidate cache based on more complex scenarios (for example, the [MemberGroupCacheRefresher](https://github.com/umbraco/Umbraco-CMS/blob/9f912aea0e4759a1fcea43d7469d3d4756b6fbe1/src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs)).
5252
* `void Refresh(string jsonPayload)` - Invalidates/refreshes any cache based on the information provided in the JSON. The JSON value is any value that is used when executing the method to invoke the cache refresher.
5353

54-
There are several examples of `ICacheRefresher`'s in the core: https://github.com/umbraco/Umbraco-CMS/tree/v11/contrib/src/Umbraco.Core/Cache
54+
There are a couple of examples of `ICacheRefresher's` in the [core](https://github.com/umbraco/Umbraco-CMS/tree/9f912aea0e4759a1fcea43d7469d3d4756b6fbe1/src/Umbraco.Core/Cache).
5555

5656
### Executing an ICacheRefresher
5757

10/umbraco-cms/reference/searching/examine/indexing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ The index will only update its content when you manually trigger an index rebuil
329329
To update your index when content changes, you can use notification handlers.
330330

331331
{% hint style="info" %}
332-
The following handler class does not automatically update the descendant items of the modified content nodes, such as removing descendants of deleted content. If changes to the parent content item can affect its children or descendant items in your setup, please refer to the [UmbracoContentIndex.PerformDeleteFromIndex() in Umbraco](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Examine.Lucene/UmbracoContentIndex.cs#L124-L153). Such logic should be applied when both removing and reindexing content items of type _product_.
332+
The following handler class does not automatically update the descendant items of the modified content nodes, such as removing descendants of deleted content. If changes to the parent content item can affect its children or descendant items in your setup, please refer to the [UmbracoContentIndex.PerformDeleteFromIndex() in Umbraco](https://github.com/umbraco/Umbraco-CMS/blob/main/src/Umbraco.Examine.Lucene/UmbracoContentIndex.cs#L124-L153). Such logic should be applied when both removing and reindexing content items of type _product_.
333333
{% endhint %}
334334

335335
```csharp

0 commit comments

Comments
 (0)