1.6 KiB
title | draft | date |
---|---|---|
quartz-docker | false | 2025-01-16 |
📄 quartz-docker
This project runs Quartz 4, a fast, batteries-included static site generator, inside a Docker container. It transforms Markdown content into a fully functional website.
🚀 Features
- configurable with environment variables
- node and nginx included
- configurable cron for job to pull and build site
🛠️ Getting Started
Docker Compose
See a list of all Environment Variables environment variables
-
Create a data directory and pull your existing content
git clone https://code.modernleft.org/gravityfargo/modernleft-docs.git quartz
-
Create a
docker-compose.yml
fileMinimal
BASE_URL
The only required variable is
BASE_URL
. The rest are set to the developer's defaultsBASE_URL
sets both quartz'sbaseUrl
as well as nginx'sserver_name
.Recommended
node_modules volume
To keep the image small,
node_modules
are not included. When the container is run, they're downloaded to/usr/share/nginx/html/node_modules
. You should keep them in a volume so that the modules persist between container runs.cron
You should also set
ENABLE_CRON
totrue
and setBUILD_SCHEDULE
to a cron expression to enable the cron job thatnpx quartz build
is executed which will pull the latest content and build the site.