mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-08 01:55:13 +00:00
Add Dockerfile for self-hosted deployment, bump build.sh to Zola 0.23.1
Adds a multi-stage Dockerfile (Node for llms.txt generation, the official Zola image to build, static-web-server to serve) for deploying via Dokploy/Docker instead of Cloudflare Pages. This is an additional path, not a replacement - wrangler.toml and the Cloudflare build.sh remain in place as an option. Also bumps build.sh's pinned ZOLA_VERSION from 0.22.1 to 0.23.1: the prior commit migrated every template to Tera v2 syntax (components, spread operator, native slicing), which 0.22.1 can't parse - confirmed by a live Cloudflare build failure on this branch. Keeping build.sh and the Dockerfile on the same Zola version avoids maintaining two template dialects across the two deploy paths. Verified: `docker build` succeeds, the container serves the homepage, a post, the youtube embed, and a proper 404; `build.sh` also runs clean standalone (simulating the Cloudflare build) and produces a fully populated public/.
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
public
|
||||||
|
node_modules
|
||||||
|
.wrangler
|
||||||
|
.git
|
||||||
|
manimations/*.*
|
||||||
|
/zola
|
||||||
|
/zola-v*.tar.gz
|
||||||
|
/artifacts
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
# Multi-stage build: generate llms.txt with Node, build the site with Zola,
|
||||||
|
# then serve the static output with static-web-server.
|
||||||
|
#
|
||||||
|
# This is the Dokploy/self-hosted deployment path. It's independent of the
|
||||||
|
# Cloudflare Pages path (`npm run deploy` / wrangler.toml) - that stays in
|
||||||
|
# place as an option, this doesn't replace it.
|
||||||
|
|
||||||
|
FROM node:22-slim AS llms
|
||||||
|
WORKDIR /project
|
||||||
|
COPY . .
|
||||||
|
RUN node scripts/generate-llms.mjs
|
||||||
|
|
||||||
|
FROM ghcr.io/getzola/zola:v0.23.1 AS zola
|
||||||
|
WORKDIR /project
|
||||||
|
COPY . .
|
||||||
|
COPY --from=llms /project/static/llms.txt static/llms.txt
|
||||||
|
RUN ["/zola", "build"]
|
||||||
|
|
||||||
|
FROM ghcr.io/static-web-server/static-web-server:2
|
||||||
|
COPY --from=zola /project/public /public
|
||||||
|
EXPOSE 80
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ZOLA_VERSION=0.22.1
|
ZOLA_VERSION=0.23.1
|
||||||
|
|
||||||
echo "Downloading Zola ${ZOLA_VERSION}..."
|
echo "Downloading Zola ${ZOLA_VERSION}..."
|
||||||
curl -sLJO "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
|
curl -sLJO "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
|
||||||
|
|||||||
Reference in New Issue
Block a user