Sign inSign up

carlitog/content-delivery-server

By carlitog

•Updated about 1 year ago

Image
Networking
Content management system
0

135

carlitog/content-delivery-server repository overview

⁠Content Delivery Server

Content Delivery Server Logo

Nginx-based content delivery server, designed for static file hosting with modern best practices for security and compression.

⁠Features

  • Static File Hosting: Serves files from /var/www/media with autoindex enabled.
  • HTTP/2 & SSL: Supports HTTP/2 and strong SSL/TLS protocols (TLSv1.2, TLSv1.3).
  • Compression: Brotli and Gzip enabled for efficient bandwidth usage.
  • Security: Implements strict security headers and disables cookies.
  • Long Cache for Static Files: Maximizes cache duration for static assets.
  • Minimal Logging: Access logs are buffered and error logs are set to warn level.

⁠Usage

For HTTPS only:

$ docker run -it -e HTTPS_ON=true -e HTTP_ON=false -e SERVER_NAME=my.domain.tld -p 443:443 -p 80:80  -v ./certs:/etc/ssl/cdn -v ./media:/var/www/media content-devlivery-server:1.0.0

OR

services:
  cdn:
    image: content-devlivery-server:1.0.0
    environment:
      - HTTPS_ON=true
      - HTTP_ON=false
      - SERVER_NAME=my.domain.tld
    ports:
      - "443:443"
      - "80:80"
    volumes:
      - ./certs:/etc/ssl/cdn
      - ./media:/var/www/media

For HTTP only:

$ docker run -it -e HTTPS_ON=false -e HTTP_ON=true -e SERVER_NAME=my.domain.tld -p 80:80  -v ./media:/var/www/media content-devlivery-server:1.0.0

OR

services:
  cdn:
    image: content-devlivery-server:1.0.0
    environment:
      - HTTPS_ON=false
      - HTTP_ON=true
      - SERVER_NAME=my.domain.tld
    ports:
      - "80:80"
    volumes:
      - ./media:/var/www/media

⁠License

This project is licensed under the MIT License. See the LICENSE⁠ file for details.

Tag summary

Content type

Image

Digest

sha256:0b5abea5a…

Size

8.1 MB

Last updated

about 1 year ago

docker pull carlitog/content-delivery-server:1.0.0