Files
Hexo-Butterfly/docker-compose.yml
T
Leon Xu f18719417f
Lint, build, test and deploy / build (push) Successful in 1m48s
Lint, build, test and deploy / test (push) Successful in 5s
Lint, build, test and deploy / deploy (push) Successful in 4s
Document local Docker and Finch usage; fix dependency-volume reset instructions
2026-11-29 15:13:47 -08:00

24 lines
741 B
YAML

# Docker-compatible dev/preview environment (Docker, or Finch on macOS).
# 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, rebuild and reset the
# named dependency volume:
# docker compose build && docker compose down -v && docker compose up
services:
hexo:
build: .
image: hexo-dev
ports:
- "4000:4000"
volumes:
- .:/site
- hexo_node_modules:/site/node_modules
volumes:
hexo_node_modules: