Sign inSign up

jonmatum/draftmk-preview

By jonmatum

•Updated over 1 year ago

NGINX server for DraftMk static previews with zero caching.

Image
Developer tools
0

488

jonmatum/draftmk-preview repository overview

⁠Draftmk Preview NGINX (Docker Image)

This repository contains a Docker image for serving Draftmk documentation previews using a custom-configured NGINX setup. It includes minimal UI states (loading, error, fallback) and disables all caching to ensure real-time content delivery.

Note: This image is designed for deployment only — it does not build documentation or contain source code.

⁠Usage

You can run the preview container directly:

docker run -p 3000:80 jonmatum/draftmk-preview

Or use Docker Compose (recommended for mounting site folders):

docker-compose up --build

⁠Directory Structure

This image serves static files from the following locations:

  • /public/ → ./site/public
  • /internal/ → ./site/internal

Make sure your docker-compose.yml mounts these paths correctly:

volumes:
  - ./site/public:/usr/share/nginx/html/public:ro
  - ./site/internal:/usr/share/nginx/html/internal:ro

⁠Features

  • No caching: always serves the latest content

  • Support for both internal and public preview paths

  • Custom fallback UI pages:

    • index.html – default landing page
    • loading.html – displayed when content is not found (404)
    • error.html – displayed on server or build errors (500+)

⁠Docker Hub Image

To pull the latest image:

docker pull jonmatum/draftmk-preview:latest

⁠License

This Docker setup is provided under the MIT License.


echo "Pura Vida & Happy Coding!";

Tag summary

Content type

Image

Digest

sha256:98381aa85…

Size

20 MB

Last updated

over 1 year ago

docker pull jonmatum/draftmk-preview