Add NAS-friendly Docker dev image (compose-based build and preview)
Lint, build, test and deploy / build (push) Successful in 1m40s
Lint, build, test and deploy / test (push) Successful in 6s
Lint, build, test and deploy / deploy (push) Successful in 4s

This commit is contained in:
Leon Xu committed 2026-11-29 15:12:38 -08:00
1 parent c96f7294ec
commit 6551070646
4 files changed
+75

No files matched your search

+19
View File
@@ -55,6 +55,25 @@ Steps:
npm install -g hexo-cli
```
### Docker (no Node or node_modules on the host)
For Docker-capable machines where you don't want to install Node — e.g. a
NAS — the repo ships a dev image. Dependencies are baked into the image;
the source is mounted in, and a named volume shields `node_modules` so the
host filesystem stays clean:
```bash
docker compose up # preview at http://<host>:4000
docker compose run --rm hexo generate # build the site into ./public
```
After changing `package.json` or `yarn.lock`, rebuild and reset the
dependency volume:
```bash
docker compose build && docker compose up -V
```
### Forking the deploy setup
The CI/CD pipeline lives in [`.gitea/workflows/deploy.yml`]. To reuse it you need: