March 12, 2026 5 minutes
Date: 2026-03-12
Status: Complete — container running at http://192.168.1.70:1212/
Built and deployed a personal academic website on Synology NAS using Docker. The site uses Hugo with the Doks theme and auto-rebuilds whenever Markdown files are dropped into /var/services/homes/omnihola/website-content/.
/var/services/homes/omnihola/website-content/ ← intellectual property (your .md files)
├── about/
├── publications/
├── blog/
├── projects/
└── other/
/volume1/docker/hugo-doks/ ← Hugo engine & Docker infrastructure
├── site/ ← Hugo project root
│ ├── config/_default/
│ ├── assets/scss/
│ ├── layouts/partials/
│ └── content/en/ ← scaffold only; /var/services/homes/omnihola/website-content mounted here at runtime
├── Dockerfile
├── docker-compose.yml
├── nginx.conf
├── supervisord.conf
└── scripts/watch-and-build.shRuntime flow:
Drop .md file → /var/services/homes/omnihola/website-content/
↓
inotifywait detects change (~2s debounce)
↓
hugo --minify rebuilds site (~3-8s)
↓
nginx serves /site/public/ on port 80
↓
Synology reverse proxy (HTTPS port 443) → public internet| Component | Version / Detail |
|---|---|
| Hugo | Extended 0.128.0 |
| Theme | @hyas/doks-core v1.6.1 (npm) |
| Node.js | 20 Alpine (builder stage only) |
| Nginx | Alpine package |
| Supervisord | Alpine package |
| inotify-tools | Alpine package |
| Docker base | node:20-alpine (builder) + alpine:3.20 (runtime) |
| Docker Compose | v2.20.1 |
| Section | URL | Content path |
|---|---|---|
| About / Bio | /about/ | /var/services/homes/omnihola/website-content/about/ |
| Publications | /publications/ | /var/services/homes/omnihola/website-content/publications/ |
| Blog / Notes | /blog/ | /var/services/homes/omnihola/website-content/blog/ |
| Projects | /projects/ | /var/services/homes/omnihola/website-content/projects/ |
| Other | /other/ | /var/services/homes/omnihola/website-content/other/ |
services:
hugo-doks:
build:
context: .
dockerfile: Dockerfile
container_name: hugo-doks
ports:
- "1212:80"
volumes:
- /volume1/homes/omnihola/website-content:/site/content-raw/en:ro
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"node:20-alpine + Hugo + npm install + hugo --minifyalpine:3.20 + nginx + inotify-tools + supervisord + Hugo + nodejsgcompat required in both stages (Hugo Extended is glibc-linked, Alpine uses musl)nodejs required in runtime stage (PostCSS transform needs Node at hugo rebuild time)The Doks v1.x theme uses npm packages resolved via Hugo module mounts (not Go modules).
site/config/_default/module.toml mounts all theme files from node_modules/ and maps
content/en directly as the Hugo content directory.
/site/content recursively with inotifywaithugo --minify on change[watcher] and [hugo] prefixed outputHugo Extended binary is dynamically linked against glibc. Alpine uses musl libc.
Fix: Add gcompat to both builder and runtime stages in Dockerfile.
@hyas/doks-core@^2.4.2 does not existThe package never reached v2. Latest is v1.6.1.
Fix: Updated package.json to @hyas/[email protected] with all required companions:
{
"dependencies": {
"@hyas/doks-core": "^1.6.1",
"@hyas/images": "^3.2.0",
"@hyas/seo": "^2.3.0",
"@hyas/inline-svg": "^1.1.0",
"@tabler/icons": "^3.3.0",
"gethyas": "^2.4.2"
}
}Original hugo.toml used [[module.imports]] (Go module system). Doks uses npm packages
resolved via Hugo module mounts.
Fix: Removed [module] block from hugo.toml. Created site/config/_default/module.toml
that mounts all theme files from node_modules/.
Fix: Created:
layouts/partials/footer/script-footer-custom.htmllayouts/partials/head/custom-head.htmllayouts/partials/head/script-header.htmlFix: Created:
assets/scss/common/_variables-custom.scssassets/scss/common/_custom.scssFix: Created site/config/postcss.config.js. Added @fullhuman/postcss-purgecss to devDependencies.
PostCSS transform requires Node during hugo rebuild (not just build time).
Fix: Added nodejs to the runtime Alpine stage in Dockerfile.
Synology SSH uses internal-sftp subsystem — rsync is blocked.
Fix: Used tar | ssh pipe to transfer files:
tar -czf - /local/files/ | ssh nas "cd /var/services/homes/omnihola/website-content && tar -xzf -"The content directory now lives under the Synology home folder:
/var/services/homes/omnihola/website-content.
This path is visible through Synology Drive/File Station and is mounted read-only
into the container as /site/content-raw/en.
| Item | Detail |
|---|---|
| Docker binary path | /volume1/@appstore/ContainerManager/usr/bin/docker (NOT in PATH) |
| Docker Compose | docker compose (v2, with space) works |
| rsync | Blocked — use tar | ssh pipe instead |
| Content directory | /var/services/homes/omnihola/website-content (Drive-friendly home folder) |
| NAS IP | 192.168.1.70 |
| SSH user | omnihola |
| Container port | 1212 (host) → 80 (container) |
.md file:---
title: "Paper Title"
date: 2026-03-12
authors: ["Your Name", "Co-author"]
journal: "Nature"
doi: "10.xxxx/xxxxx"
draft: false
---
Abstract here./var/services/homes/omnihola/website-content/publications/ via Synology Drive/File Station or SFTPscp mypaper.md nas:/var/services/homes/omnihola/website-content/publications/mypaper.mdssh nas \
"sudo /volume1/@appstore/ContainerManager/usr/bin/docker logs hugo-doks --tail 50 -f"ssh nas \
"cd /volume1/docker/hugo-doks && sudo /volume1/@appstore/ContainerManager/usr/bin/docker compose restart"# Transfer updated files
tar -czf - -C /home/benny/Desktop/claude/hugo-doks-project . \
--exclude './site/node_modules' --exclude './site/public' | \
ssh nas \
"cd /volume1/docker/hugo-doks && tar -xzf -"
# Rebuild image and restart
ssh nas \
"cd /volume1/docker/hugo-doks && \
sudo /volume1/@appstore/ContainerManager/usr/bin/docker build -t hugo-doks:latest . && \
sudo /volume1/@appstore/ContainerManager/usr/bin/docker compose up -d"/volume1/docker/hugo-doks/site/config/_default/params.toml, replace "Your Name" with actual name, then rebuild imagelocalhost:1212assets/favicon.png (512×512px minimum) to silence build warning@hyas/* packages are deprecated in favour of @thulite/*. Low priority since everything works.Source files on local machine: /home/benny/Desktop/claude/hugo-doks-project/
Design spec: /home/benny/Desktop/claude/docs/superpowers/specs/2026-03-12-hugo-doks-nas-design.md
Implementation plan: /home/benny/Desktop/claude/docs/superpowers/plans/2026-03-12-hugo-doks-nas.md