fix: bind mounts from DOCKER_PATH + real storage reads from disk
docker-compose.yml:
- Switch from named volumes back to bind mounts driven by DOCKER_PATH in .env
- DOCKER_PATH/config → /config, DOCKER_PATH/data → /data
- Works with both Windows paths (C:\...) and Linux paths (/opt/...)
server.go:
- Wire in storage.Store so documents query reads real .adoc files from disk
- handleDocuments: calls store.List("") and store.Read(slug) for actual content
- extractTitle: parses first "= Title" line from AsciiDoc, falls back to slug
- handleSetup: also initialises store after writing config so docs appear immediately
- Single document query (document(slug:...)) reads and returns full content
.env.example:
- Clarify DOCKER_PATH usage with Windows and Linux examples
- Show resulting directory layout on host
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
36
.env.example
36
.env.example
@@ -16,21 +16,27 @@ REGISTRY=192.168.0.19:5000
|
||||
IMAGE_TAG=latest
|
||||
|
||||
|
||||
# ── Host paths ─────────────────────────────────────────────────────────────────
|
||||
# Base directory — all data lives under this path.
|
||||
# Adjust to wherever you want to store Archivum data on the host.
|
||||
ARCHIVUM_BASE=/opt/archivum
|
||||
|
||||
# Configuration directory (config.json, settings.json).
|
||||
# The Setup Wizard will create config.json here on first access.
|
||||
ARCHIVUM_CONFIG=/opt/archivum/config
|
||||
|
||||
# AsciiDoc wiki files + git repository root.
|
||||
ARCHIVUM_WIKI=/opt/archivum/wiki
|
||||
|
||||
# SQLite database directory.
|
||||
# The database file will be created as archivum.db inside this directory.
|
||||
ARCHIVUM_DB=/opt/archivum/db
|
||||
# ── Host paths (docker-compose.yml) ───────────────────────────────────────────
|
||||
# DOCKER_PATH is the base directory on the HOST where data is stored.
|
||||
# docker-compose.yml maps:
|
||||
# DOCKER_PATH/config → /config (config.json written here by Setup Wizard)
|
||||
# DOCKER_PATH/data → /data (wiki files in data/wiki, db in data/db)
|
||||
#
|
||||
# Windows example (Docker Desktop):
|
||||
# DOCKER_PATH=C:\Repo\AW\Archivum\docker
|
||||
#
|
||||
# Linux / WSL example:
|
||||
# DOCKER_PATH=/opt/archivum
|
||||
#
|
||||
# The directory structure on the host will be:
|
||||
# DOCKER_PATH/
|
||||
# ├── config/
|
||||
# │ └── config.json ← written by Setup Wizard
|
||||
# └── data/
|
||||
# ├── wiki/ ← put your .adoc files here
|
||||
# └── db/
|
||||
# └── archivum.db ← auto-created
|
||||
DOCKER_PATH=C:\Repo\AW\Archivum\docker
|
||||
|
||||
|
||||
# ── Network ────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user