Skip to content

MkDocs (material theme) configured to run with Nginx and basic authentication (htpasswd) using Docker

Notifications You must be signed in to change notification settings

lalebot/mkdocs-nginx

Repository files navigation

📑 MkDocs with Nginx, htpasswd, and Docker

This repository contains a MkDocs (material theme) configured to run with Nginx and basic authentication (htpasswd) using Docker.

📂 Project Structure

├── compose.yml
├── Dockerfile
├── mkdocs
│   ├── docs
│   │   ├── img
│   │   │   └── image.png
│   │   ├── index.md
│   │   └── others.md
│   └── mkdocs.yml
├── nginx.conf
├── poetry.lock
├── poetry.toml
├── pyproject.toml
└── README.md
  • mkdocs: Directory containing the MkDocs documentation files.
  • Dockerfile: Dockerfile to build the MkDocs project.
  • nginx.conf: Nginx configuration file.
  • .htpasswd: File containing the usernames and passwords for basic authentication.
  • docker-compose.yml: Docker Compose file to manage Docker containers.

🛠️ Prerequisites

  • Docker installed on your machine.

🔐 Create the .htpasswd file:

You can use the htpasswd utility to create this file:

htpasswd -c .htpasswd username

Follow the prompts to set the password for username.

▶️ Running the Project

To start the MkDocs site with Nginx and basic authentication, run:

docker-compose up -d

⚙️ Customization

MkDocs Configuration:

Edit the mkdocs.yml file to customize your MkDocs site.

Nginx Configuration:

Edit the nginx.conf file to customize the Nginx setup.

htpasswd:

Use the htpasswd utility to manage users and passwords in the .htpasswd file.

About

MkDocs (material theme) configured to run with Nginx and basic authentication (htpasswd) using Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published