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

+21
View File
@@ -0,0 +1,21 @@
# NAS-friendly dev/preview environment. No Node or node_modules on the host:
# dependencies live in the image, the source is bind-mounted, and a named
# volume shields /site/node_modules from the bind mount.
#
# docker compose up # preview on http://<host>:4000
# docker compose run --rm hexo generate # build into ./public
#
# After changing package.json or yarn.lock:
# docker compose build && docker compose up -V # rebuild + reset deps
services:
hexo:
build: .
image: hexo-dev
ports:
- "4000:4000"
volumes:
- .:/site
- hexo_node_modules:/site/node_modules
volumes:
hexo_node_modules: