Files
Archivum/.env.example
brasse b 4ba3b7dd49 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>
2026-04-10 14:45:08 +02:00

58 lines
2.9 KiB
Plaintext

# ── Archivum — environment variables example ──────────────────────────────────
# Copy to .env and edit before running docker-compose.prod.yml
#
# cp .env.example .env
#
# Lines starting with # are comments and are ignored.
# ──────────────────────────────────────────────────────────────────────────────
# ── Registry ───────────────────────────────────────────────────────────────────
# Address of your private Docker registry.
REGISTRY=192.168.0.19:5000
# Image tag to pull. Use a specific digest in production for reproducible deploys.
# IMAGE_TAG=sha256:abc123...
IMAGE_TAG=latest
# ── 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 ────────────────────────────────────────────────────────────────────
# Port exposed on the host. Access the app at http://<host>:HOST_PORT
HOST_PORT=8080
# ── File system permissions ─────────────────────────────────────────────────────
# UID and GID of the user that owns the host directories above.
# Run `id` on the host to find the correct values.
# Using 1000:1000 is fine if you created the directories as your own user.
PUID=1000
PGID=1000
# ── Timezone ───────────────────────────────────────────────────────────────────
# Used for git commit timestamps. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=Europe/Stockholm