Problems fixed:
- archivum user (UID 1000) could not write to bind-mounted /config or /data
because Docker (especially on Windows/WSL2) creates volumes owned by root
- /data/wiki and /data/db subdirectories were never created, causing
"no such file or directory" when the app tried to write files
Changes:
- docker/entrypoint.sh: runs as root, creates /config /data/wiki /data/db,
chowns them to PUID:PGID, then drops privileges via su-exec
- Dockerfile: install su-exec + git, copy entrypoint, remove build-time
USER directive (privilege drop happens at runtime via entrypoint)
- docker-compose.yml: switch local dev to named volumes so Docker manages
ownership automatically (avoids Windows/WSL2 bind-mount permission issues);
add TZ env var; explicit comments on how to switch to bind mounts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docker/docker-compose.prod.yml: pulls image from 192.168.0.19:5000,
mounts config/, wiki/ and db/ as separate volumes, health check, TZ support
- .env.example: fully commented template for all env vars
- .gitignore: ignore .env, always track .env.example
- README: deployment section with step-by-step guide, volume table, backup commands
- config.go: default db_path to /data/db/archivum.db (matches prod volume layout)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removed go.sum from the COPY cache layer — go mod download -x creates it
when absent. Added empty backend/go.sum for local tooling (gopls, go build).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>