Skip to content

Commit 2431119

Browse files
committed
Cross-referenced details on the running Umbraco in Docker page
1 parent 1c78ce2 commit 2431119

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

16/umbraco-cms/fundamentals/setup/server-setup/running-umbraco-in-docker.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,49 @@ Docker is a platform for developing, shipping, and running applications in conta
88

99
## The Docker file system
1010

11-
By default, files created inside a container are written to an ephemeral, writable container layer.
11+
By default, files created inside a container are written to an ephemeral, writable container layer.
1212
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.
1313

1414
This has implications when running Umbraco in Docker.
1515

1616
For more information, refer to the [Docker documentation on storage](https://docs.docker.com/engine/storage/).
1717

18-
### General file system consideration
18+
### General file system consideration
1919

2020
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.
2121

2222
This means that you should avoid making files on the fly, and instead rely on building your image.
2323

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.
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.
2525

2626
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.
2727

2828
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).
2929

30-
3130
### Logs
3231

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.
32+
Umbraco writes logs to the `/umbraco/Logs/` directory. Due to the performance implications of writing to a writable layer, and the limited size, it is recommended to mount a volume to this directory.
33+
34+
You may prefer to avoid writing to disk for logs when hosting in containers. If so, you can disable this default behavior and register a custom Serilog sink to alternative storage, such as Azure Table storage.
35+
36+
You can also provide an alternative implementation of a common abstraction for the log viewer. In this way you can read logs from the location where you have configured them to be written.
37+
38+
For more on this please read the article on Umbraco's [log viewer](../../backoffice/logviewer.md).
3539

3640
### Data
3741

3842
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.
3943

4044
### Media
4145

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.
46+
It's recommended to not store media in the writable layer. This is for similar performance reasons as logs,
47+
but also for practical hosting reasons. You likely want to persist media files between containers.
4448

4549
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).
4650

4751
### Required files
4852

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.
53+
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.
5054

5155
## HTTPS
5256

0 commit comments

Comments
 (0)