Add NAS-friendly Docker dev image (compose-based build and preview)
This commit is contained in:
1 parent
c96f7294ec
commit
6551070646
4 files changed
+75
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user