Sign inSign up

kavenzero/kaven-pages

By kavenzero

•Updated 3 months ago

Image
1

782

kavenzero/kaven-pages repository overview

⁠Kaven-Pages

Kaven-Pages is a lightweight GitHub‑Pages–style server that renders repository content and automatically deploys updates when webhook events arrive. It downloads and extracts repository archives into the configured public folder so you can host static sites (HTML, Markdown, README) directly from a repo.

Key features:

  • Automatic deploys via webhooks with optional secret verification and authorization token for private repos
  • Serves static files from configurable public folders and recognizes common home pages (index.html, index.md, README.md)
  • Simple JSON configuration (.config.json) and Docker support for quick deployment
  • Optional HTTPS, logging, and customizable extract/download directories

Use it to host documentation, simple sites, or project pages with minimal setup and automated updates.

⁠Config

{
    "NODE_ENV": "production",
    "SERVER_IP": "0.0.0.0",
    "SERVER_PORT": 5840,
    "ENABLE_HTTPS": false,
    "SSL_KEY_PATH": "",
    "SSL_CERT_PATH": "",
    "PUBLIC_FOLDERS": [
        "public",
        "internal"
    ],
    "ENABLE_LOG": true,
    "LOG_FILE_PATH": "./logs/log.txt",
    "ANSI_LOG_FILE_PATH": "./logs/ansi_log.txt",
    "TRUST_PROXY": "loopback, linklocal, uniquelocal",
    "ALLOWED_DOMAIN_NAMES": [
        "kaven.xyz",
        "wuwenkai.com"
    ],
    "FAVICON_FILE_PATH": "./public/favicon.ico",
    "HOME_PAGES": [
        "index.html",
        "index.md",
        "README.md"
    ],
    "WEBHOOK": {
        "URL": "/webhook",
        "SECRET": "",
        "AUTHORIZATION_TOKEN": "",
        "DOWNLOAD_DIR": "download",
        "EXTRACT_DIR": "public"
    }
}
  • WEBHOOK.SECRET: Secret for webhook verification.
  • WEBHOOK.AUTHORIZATION_TOKEN: Optional, an access token for reading the repository.

⁠Docker

# docker-compose.yml
services:
  kaven-pages:
    image: kavenzero/kaven-pages:latest
    container_name: kaven-pages
    ports:
      - "5840:5840"
    volumes:
      - ./.config.json:/app/.config.json
    stdin_open: true
    tty: true
    restart: unless-stopped
⁠Copy config file
# Copy `.config.example.json` file from container
docker run --name temp -d kavenzero/kaven-pages:latest
docker cp temp:/app/.config.example.json $(pwd)/.config.json
docker rm -f temp
⁠Update config

Update .config.json and set WEBHOOK.SECRET and WEBHOOK.AUTHORIZATION_TOKEN as needed.

⁠Start
# Start the container
docker compose up -d

# Or use docker run
docker run --name kaven-pages -d -v ./.config.json:/app/.config.json kavenzero/kaven-pages:latest

After starting the container, you can trigger the webhook (e.g., via a push event from GitHub or Gitea). The app will automatically download the repository archive and extract its contents into the public folder. Ensure that WEBHOOK.AUTHORIZATION_TOKEN is set if accessing private repositories.

⁠Advanced

If you need more control, you can map the /app/public and /app/logs folders. Note that you may encounter permission issues if the container user does not have write access to these folders on the host; to resolve this, ensure the host directories are owned by the same UID and GID as the container user (see the commands below).

# docker-compose.yml
services:
  kaven-pages:
    image: kavenzero/kaven-pages:latest
    container_name: kaven-pages
    ports:
      - "5840:5840"
    volumes:
      - ./public:/app/public
      - ./logs:/app/logs
      - ./.config.json:/app/.config.json
    stdin_open: true
    tty: true
    restart: unless-stopped
# Create folders if missing
mkdir -p ./public ./logs

# Get UID and GID of appuser from the container (BusyBox)
# Note: The following command assumes a bash-compatible shell. For other shells, adjust the variable assignment as needed.
read CON_UID CON_GID <<< $(docker run --rm kavenzero/kaven-pages:latest sh -c 'echo $(id -u appuser) $(id -g appuser)')

# Set ownership on host folders
sudo chown -R $CON_UID:$CON_GID ./public ./logs

Tag summary

Content type

Image

Digest

sha256:7d6ab8d43…

Size

88.5 MB

Last updated

3 months ago

docker pull kavenzero/kaven-pages