Sign inSign up

codebeltnet/web-cdn-origin

By codebeltnet

•Updated 3 days ago

An ASP.NET Core solution that has the role of a CDN / CDN origin.

Image
Web servers
Content management system
0

576

codebeltnet/web-cdn-origin repository overview

An image thought to be used as CDN / CDN origin / static content provider for your web-app.

Example: docker run --name cdn-origin -d -p 8000:80 -v some-path-with-static-files:/cdnroot codebeltnet/web-cdn-origin:1.2.0

You can also write an embedded version of this image; here is an example:

FROM codebeltnet/web-cdn-origin:1.2.0

WORKDIR /cdnroot
ADD cdnroot .

WORKDIR /app

This would run as: docker run --name cdn-origin -d -p 8000:80 yourAmazingImage:SomeTag

ENVIRONMENT VARIABLES

  • CACHECONTROL_MAXAGE (double, default value is 12)
  • CACHECONTROL_MAXAGE_TIMEUNIT (enum, default value is Hours)*
  • CACHECONTROL_SHAREDMAXAGE (double, default value is 168)
  • CACHECONTROL_SHAREDMAXAGE_TIMEUNIT (enum, default value is Hours)*
  • CDNROOT_DEFAULTFILES (semi-colon-delimited string, default value is default.htm;default.html;index.htm;index.html)**
  • CDNROOT (filePath to the static files that need to be published, default value is /cdnroot)
  • ETAG_BYTESTOREAD (int, default value is 2147483647 (strong validation))

*) Enum values: Days, Hours, Minutes, Seconds, Milliseconds, Ticks

Documentation for TimeUnit⁠

**) The root of the CDN-origin will search for a file with the name specified; if match, the file will be served as a default content.

Updated with support for response compression: https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?view=aspnetcore-5.0⁠

Tag summary

Content type

Image

Digest

sha256:d53c894f8…

Size

51.5 MB

Last updated

3 days ago

docker pull codebeltnet/web-cdn-origin:2.0.0