Sign inSign up

vasujain275/dockerized-quartz

By vasujain275

•Updated about 1 year ago

Quartz static site generator running in docker ( multi arch fork of - shommey/dockerized-quartz )

Image
Web servers
Content management system
0

8.0K

vasujain275/dockerized-quartz repository overview

⁠Dockerized Quartz

Quartz (v4)⁠ is a lightweight static site generator that helps you host your digital garden. This project provides an automated, dockerized solution to build and serve Quartz sites with minimal configuration.

Github source⁠

⁠Features

  • Minimal Configuration: Simply plug in your existing Obsidian Vault as a Docker bind volume.
  • Automated Builds: Quartz will rebuild every time after a set delay as notes in your docker volume change.
  • Default or Custom Quartz Repository: If none is present, the container will clone a git repo on startup, either the official Quartz repo or your custom one.
  • Support for Private Repositories: If you want to hide your Quartz configuration.
  • NGINX Web Server: Served with NGINX, using a basic configuration by default that can be extended by mounting a volume and editing nginx.conf.
  • Basic Authentication: Protect your site with a username and password.
  • Cron Job Triggers: Set up scheduled rebuilds using cron jobs.
  • Webhook Triggers: Trigger a rebuild of your site using a webhook.
  • Notifications: Configure notifications for build events.

⁠Environment Variables

VariableDescriptionDefault
GIT_REPOThe git repository to clone for your Quartz site.https://github.com/jackyzha0/quartz.git
GIT_BRANCHThe branch to checkout from the git repository.v4
BUILD_UPDATE_DELAYThe delay in seconds after which Quartz will rebuild when changes are detected in the vault.300
AUTO_REBUILDEnable or disable automatic rebuilding of Quartz when changes are detected in the vault.true
REBUILD_WEBHOOK_SECRETThe secret to use for the webhook trigger. If not set, the webhook server will not be started.
NOTIFY_TARGETThe target for notifications. See Apprise⁠ for supported notification services.
BASIC_AUTH_USERNAMEThe username for basic authentication.
BASIC_AUTH_PASSWORDThe password for basic authentication.
CRON_JOBA cron expression to trigger a rebuild of the site.

⁠Quick Start

To quickly get started with Quartz in Docker:

⁠1. Clone the repository:
git clone https://github.com/shommey/dockerized-quartz.git
cd dockerized-quartz
⁠2. Create your docker-compose.yml

Copy the provided example:

cp docker-compose.yml.example docker-compose.yml
⁠3. Edit the compose file:

You must update the volume path to your Obsidian vault.

version: '3.8'
services:
    quartz:
        image: vasujain275/dockerized-quartz
        container_name: quartz-notes
        environment:
        # Use your custom Quartz repo or leave blank for the default Quartz repo
        # GIT_REPO: "https://github.com/yourusername/your-quartz-site.git"
        # Optional: specify a branch to checkout
        # GIT_BRANCH: "v4"
        # Optional: Update delay after which quartz build will trigger, default 300 seconds
        BUILD_UPDATE_DELAY: 900
        # Optional: Auto rebuild Quartz after change in Obsidian Vault 
        AUTO_REBUILD: true
        volumes:
        # Mount your Obsidian vault for Quartz to read and build the site from
        - /path/on/host:/vault:ro
        # Optional: Mount existing Quartz repo
        # - /path/on/host:/usr/src/app/quartz
        # Optional: Persist nginx logs if needed
        # - /path/to/nginx/logs:/var/log/nginx
        # Optional: Mount nginx conf
        # - /path/on/host:/etc/nginx
        ports:
        # Map any port on the host to port 80 in the container for web access
        - "80:80"
        restart: unless-stopped
⁠4. Run it:
docker compose up -d

Access your Quartz site on http://<YOUR_MACHINE_IP>:<PORT>

Tag summary

Content type

Image

Digest

sha256:88b3bff12…

Size

158.8 MB

Last updated

about 1 year ago

docker pull vasujain275/dockerized-quartz