Retire quartz, hasura and autoheal into .deprecated/
Deploy with Docker Compose / deploy (push) Successful in 1m1s
Deploy with Docker Compose / deploy (push) Successful in 1m1s
Quartz was already replaced by silverbullet-public; its build context moves to .deprecated/quartz. Hasura and autoheal are removed from the stack, with their compose services (and Hasura's nginx blocks) kept verbatim under .deprecated/ alongside a README on how to bring each back. Removes the /hasura/ route from both nginx templates and the envsubst allow-list, and updates the docs and comments that referred to the three services. With autoheal gone nothing restarts an unhealthy container; the healthchecks are now informational only, and the docs say so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# =============================================================================
|
||||
# Quartz image — builds the Obsidian notes site.
|
||||
#
|
||||
# STATUS: RETIRED (not live). /notes/ is now served by the read-only
|
||||
# silverbullet-public service; this directory is no longer referenced by
|
||||
# docker-compose.yml or nginx. Kept for reference / rollback: restoring it means
|
||||
# re-adding the service, the QUARTZ_* vars to nginx/entrypoint.sh's allow-list,
|
||||
# and pointing /notes/ back at it (with the prefix-strip rewrite Quartz needs).
|
||||
#
|
||||
# HOW THE SOURCE IS OBTAINED: Quartz is not an npm package you depend on, it is
|
||||
# an application you clone and configure. So the image `git clone`s the
|
||||
# upstream repo at build time, which is why `git` is installed. --depth 1
|
||||
# --branch pins to an exact tag (QUARTZ_VERSION, overridable as a build ARG)
|
||||
# and fetches no history — a shallow clone is much faster on a Pi and the
|
||||
# history is of no use here.
|
||||
#
|
||||
# Because this clone happens at build time, upstream Quartz is only updated
|
||||
# when the image is rebuilt with a bumped QUARTZ_VERSION. The tag pin is the
|
||||
# thing stopping an upstream change from breaking the notes site on a routine
|
||||
# redeploy.
|
||||
#
|
||||
# gettext-base supplies `envsubst` for rendering quartz.config.ts from its
|
||||
# template at container start (see quartz/entrypoint.sh).
|
||||
#
|
||||
# quartz.config.ts.template and quartz.layout.ts are copied in AFTER the clone
|
||||
# so they land on top of the upstream defaults — layout is used as-is, config
|
||||
# is templated at runtime because it needs DOMAIN.
|
||||
#
|
||||
# node:22-slim is multi-arch, so this builds unchanged on the Pi.
|
||||
# =============================================================================
|
||||
FROM node:22-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --yes git gettext-base \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /quartz
|
||||
|
||||
ARG QUARTZ_VERSION=v4.4.0
|
||||
RUN git clone --depth 1 --branch ${QUARTZ_VERSION} \
|
||||
https://github.com/jackyzha0/quartz.git . \
|
||||
&& npm ci
|
||||
|
||||
COPY quartz.config.ts.template /quartz/quartz.config.ts.template
|
||||
COPY quartz.layout.ts /quartz/quartz.layout.ts
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
# =============================================================================
|
||||
# quartz entrypoint — render the config, then build-and-serve the notes site.
|
||||
#
|
||||
# WHAT IT DOES
|
||||
# Quartz turns the Obsidian vault into a static site. Its config is a
|
||||
# TypeScript file that has to know the public base URL, which is only known
|
||||
# at runtime, so quartz.config.ts is generated from a template on each start.
|
||||
#
|
||||
# THE envsubst ALLOW-LIST
|
||||
# Only ${DOMAIN} is substituted. This matters more here than elsewhere: the
|
||||
# template is TypeScript and full of `${...}` -shaped syntax and dollar signs
|
||||
# that must NOT be touched. Restricting envsubst to a single name guarantees
|
||||
# it can only ever rewrite the one intended line (baseUrl).
|
||||
#
|
||||
# WHY build --serve RATHER THAN A STATIC BUILD
|
||||
# --serve leaves Quartz running as an HTTP server AND watching the content
|
||||
# directory, so editing a note in Obsidian on the host re-renders the site
|
||||
# live with no container restart. The vault is bind-mounted READ-ONLY
|
||||
# (docker-compose.yml), so Quartz can watch it but never write to it.
|
||||
# The trade-off is that this is a long-running Node process on a Pi rather
|
||||
# than pre-built static files nginx could serve for free.
|
||||
#
|
||||
# ACCESS CONTROL
|
||||
# None here — Quartz is wide open on its port inside app-network. The site is
|
||||
# private because nginx gates /notes/ behind an `auth_request` admin check
|
||||
# before proxying. Never publish this container's port to the host.
|
||||
#
|
||||
# ENV VARS
|
||||
# DOMAIN required; becomes baseUrl "www.<DOMAIN>/notes"
|
||||
# QUARTZ_PORT optional, defaults to 8080; must match the QUARTZ_PORT nginx
|
||||
# builds its upstream from, or /notes/ 502s.
|
||||
#
|
||||
# `exec` so the Node process becomes PID 1 and receives docker's signals.
|
||||
# =============================================================================
|
||||
set -e
|
||||
|
||||
envsubst '${DOMAIN}' \
|
||||
</quartz/quartz.config.ts.template \
|
||||
>/quartz/quartz.config.ts
|
||||
|
||||
exec npx quartz build --serve --port "${QUARTZ_PORT:-8080}"
|
||||
@@ -0,0 +1,99 @@
|
||||
// =============================================================================
|
||||
// quartz.config.ts.template — Quartz site config, rendered to quartz.config.ts
|
||||
// by quartz/entrypoint.sh at container start.
|
||||
//
|
||||
// ONLY the DOMAIN placeholder is substituted (envsubst is given a one-name allow-list), so
|
||||
// every other dollar sign and backtick-template-looking construct in this
|
||||
// TypeScript file survives untouched. That restriction is deliberate: a bare
|
||||
// envsubst over a .ts file would corrupt it.
|
||||
//
|
||||
// baseUrl must keep pointing at www.<DOMAIN>/notes — it has to match the path nginx
|
||||
// proxies (/notes/) or every internal link, the sitemap and the RSS feed point
|
||||
// at the wrong place.
|
||||
//
|
||||
// enableSPA / enablePopovers are off because this site is embedded under a
|
||||
// path inside another SPA; Quartz's own client-side router would fight with it.
|
||||
//
|
||||
// ignorePatterns keeps "private", "templates" and ".obsidian" out of the build
|
||||
// — the vault is mounted whole, so this list is the only thing stopping
|
||||
// private notes being published. Check it before adding vault folders.
|
||||
//
|
||||
// This file is committed with real content (no secrets). quartz.layout.ts sits
|
||||
// alongside it and is COPY'd in by quartz/Dockerfile without templating.
|
||||
// =============================================================================
|
||||
import { QuartzConfig } from "./quartz/cfg"
|
||||
import * as Plugin from "./quartz/plugins"
|
||||
|
||||
const config: QuartzConfig = {
|
||||
configuration: {
|
||||
pageTitle: "Notes",
|
||||
pageTitleSuffix: "",
|
||||
enableSPA: false,
|
||||
enablePopovers: false,
|
||||
analytics: null,
|
||||
locale: "en-GB",
|
||||
baseUrl: "www.${DOMAIN}/notes",
|
||||
ignorePatterns: ["private", "templates", ".obsidian"],
|
||||
defaultDateType: "modified",
|
||||
theme: {
|
||||
fontOrigin: "googleFonts",
|
||||
cdnCaching: true,
|
||||
typography: {
|
||||
header: "Schibsted Grotesk",
|
||||
body: "Source Sans Pro",
|
||||
code: "IBM Plex Mono",
|
||||
},
|
||||
colors: {
|
||||
lightMode: {
|
||||
light: "#faf8f8",
|
||||
lightgray: "#e5e5e5",
|
||||
gray: "#b8b8b8",
|
||||
darkgray: "#4e4e4e",
|
||||
dark: "#2b2b2b",
|
||||
secondary: "#284b63",
|
||||
tertiary: "#84a98c",
|
||||
highlight: "rgba(143, 159, 169, 0.15)",
|
||||
textHighlight: "#fff23688",
|
||||
},
|
||||
darkMode: {
|
||||
light: "#161618",
|
||||
lightgray: "#393639",
|
||||
gray: "#646464",
|
||||
darkgray: "#d4d4d4",
|
||||
dark: "#ebebec",
|
||||
secondary: "#7b97aa",
|
||||
tertiary: "#84a98c",
|
||||
highlight: "rgba(143, 159, 169, 0.15)",
|
||||
textHighlight: "#b3aa0288",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
transformers: [
|
||||
Plugin.FrontMatter(),
|
||||
Plugin.CreatedModifiedDate({ priority: ["frontmatter", "filesystem"] }),
|
||||
Plugin.SyntaxHighlighting(),
|
||||
Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }),
|
||||
Plugin.GitHubFlavoredMarkdown(),
|
||||
Plugin.TableOfContents(),
|
||||
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
|
||||
Plugin.Description(),
|
||||
Plugin.Latex({ renderEngine: "katex" }),
|
||||
],
|
||||
filters: [Plugin.RemoveDrafts()],
|
||||
emitters: [
|
||||
Plugin.AliasRedirects(),
|
||||
Plugin.ComponentResources(),
|
||||
Plugin.ContentPage(),
|
||||
Plugin.FolderPage(),
|
||||
Plugin.TagPage(),
|
||||
Plugin.ContentIndex({ enableSiteMap: true, enableRSS: true }),
|
||||
Plugin.Assets(),
|
||||
Plugin.Static(),
|
||||
Plugin.NotFoundPage(),
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
||||
@@ -0,0 +1,46 @@
|
||||
import { PageLayout, SharedLayout } from "./quartz/cfg"
|
||||
import * as Component from "./quartz/components"
|
||||
|
||||
// components shared across all pages
|
||||
export const sharedPageComponents: SharedLayout = {
|
||||
head: Component.Head(),
|
||||
header: [],
|
||||
afterBody: [],
|
||||
footer: Component.Footer({
|
||||
links: {},
|
||||
}),
|
||||
}
|
||||
|
||||
// components for pages that display a single page (e.g. a single note)
|
||||
export const defaultContentPageLayout: PageLayout = {
|
||||
beforeBody: [
|
||||
Component.Breadcrumbs(),
|
||||
Component.ArticleTitle(),
|
||||
Component.ContentMeta(),
|
||||
Component.TagList(),
|
||||
],
|
||||
left: [
|
||||
Component.PageTitle(),
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Search(),
|
||||
Component.Darkmode(),
|
||||
Component.DesktopOnly(Component.Explorer()),
|
||||
],
|
||||
right: [
|
||||
Component.DesktopOnly(Component.TableOfContents()),
|
||||
Component.Backlinks(),
|
||||
],
|
||||
}
|
||||
|
||||
// components for pages that display lists of pages (e.g. tags or folders)
|
||||
export const defaultListPageLayout: PageLayout = {
|
||||
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
||||
left: [
|
||||
Component.PageTitle(),
|
||||
Component.MobileOnly(Component.Spacer()),
|
||||
Component.Search(),
|
||||
Component.Darkmode(),
|
||||
Component.DesktopOnly(Component.Explorer()),
|
||||
],
|
||||
right: [],
|
||||
}
|
||||
Reference in New Issue
Block a user